source: ProjectBuilder/projects/afio/pbconf/2.5/afio/deb/rules@ 1204

Last change on this file since 1204 was 1204, checked in by Bruno Cornec, 13 years ago
  • Add debian 6.0 build support and VMs
  • use --no-suggests for urpmi to allow for minimal chorrot build
  • Adapt pbinit for website to new b structure (needs to be tested)
  • add afio build for debian based distro (and build it fr latest debian 6 and ubuntu 10.10)
File size: 2.5 KB
Line 
1#!/usr/bin/make -f
2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4# GNU copyright 1997 to 1999 by Joey Hess.
5#
6# $Id$
7#
8
9# Uncomment this to turn on verbose mode.
10#export DH_VERBOSE=1
11
12# Define package name variable for a one-stop change.
13PACKAGE_NAME = PBPKG
14
15# These are used for cross-compiling and for saving the configure script
16# from having to guess our platform (since we know it already)
17DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
18DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
19
20CFLAGS = -Wall -g
21
22ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23 CFLAGS += -O0
24else
25 CFLAGS += -O2
26endif
27ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
28 INSTALL_PROGRAM += -s
29endif
30
31# Build both architecture dependent and independent
32build: build-arch
33
34# Build architecture dependent
35build-arch: build-arch-stamp
36
37build-arch-stamp:
38 dh_testdir
39
40 # Compile the package.
41 $(MAKE)
42 chmod 644 script*/*
43 touch build-stamp
44
45# Clean up
46clean:
47 dh_testdir
48 dh_testroot
49 rm -f build-arch-stamp #CONFIGURE-STAMP#
50 # Clean temporary document directory
51 rm -rf debian/doc-temp
52 # Clean up.
53 -$(MAKE) distclean
54 rm -f config.log
55ifneq "$(wildcard /usr/share/misc/config.sub)" ""
56 cp -f /usr/share/misc/config.sub config.sub
57endif
58ifneq "$(wildcard /usr/share/misc/config.guess)" ""
59 cp -f /usr/share/misc/config.guess config.guess
60endif
61
62 dh_clean
63
64# Install architecture dependent and independent
65install: install-arch
66
67# Install architecture dependent
68install-arch: build-arch
69 dh_testdir
70 dh_testroot
71 dh_clean -k -s
72 dh_installdirs -s
73
74 # Install the package files into build directory:
75 dh_install -s
76 rm -rf $(CURDIR)/debian/$(PACKAGE_NAME)
77 mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/bin
78 mkdir -p $(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man/man1
79 install -p -m 755 afio $(CURDIR)/debian/$(PACKAGE_NAME)/usr/bin
80 install -p -m 644 afio.1 $(CURDIR)/debian/$(PACKAGE_NAME)/usr/share/man/man1
81
82# Must not depend on anything. This is to be called by
83# binary-arch/binary-indep
84# in another 'make' thread.
85binary-common:
86 dh_testdir
87 dh_testroot
88 #dh_installchangelogs changelog
89 dh_installdocs
90 dh_installman
91 dh_link
92 dh_strip
93 dh_compress
94 dh_fixperms
95 dh_installdeb
96 dh_shlibdeps
97 dh_gencontrol
98 dh_md5sums
99 dh_builddeb
100
101# Build architecture dependant packages using the common target.
102binary-arch: build-arch install-arch
103 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
104
105# Build architecture depdendent and independent packages
106binary: binary-arch
107.PHONY: clean binary
108
Note: See TracBrowser for help on using the repository browser.