source: debian/rules @ 212

Revision 212, 4.1 KB checked in by anarcat, 7 years ago (diff)

[project @ alternc: changeset 2004-05-19 03:18:34 by anonymous]
"stripper" les binaires installés, pour plaire à lintian ajouter des
flags standards du fichier rules

Original author: anonymous
Date: 2004-05-19 03:18:34

Line 
1#!/usr/bin/make -f
2# Sample debian/rules that uses debhelper.
3# This file is public domain software, originally written by Joey Hess.
4#
5# This version is for a multibinary package. It also allows you to build any
6# of the binary packages independantly, via binary-<package> targets.
7
8# Uncomment this to turn on verbose mode.
9export DH_VERBOSE=1
10
11ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
12        CFLAGS += -g
13endif
14ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
15        INSTALL_PROGRAM += -s
16endif
17
18########################################
19## TODO
20## Virer les lignes # inutiles ou historiques (marquées ##)
21
22
23# This has to be exported to make some magic below work.
24export DH_OPTIONS
25
26build: build-stamp
27build-stamp:
28        dh_testdir
29
30# compilation et installation des binaires
31        pushd src/ ; make ; popd
32
33        touch build-stamp
34
35clean:
36        dh_testdir
37        dh_testroot
38        rm -f build-stamp
39
40        # Add here commands to clean up after the build process.
41        #-$(MAKE) clean
42        #-$(MAKE) distclean
43        pushd src/ ; make clean; popd
44
45        dh_clean
46
47install: DH_OPTIONS=
48install: build
49        dh_testdir
50        dh_testroot
51        dh_clean -k
52        dh_installdirs
53
54
55        # Add here commands to install the package into debian/tmp.
56        #$(MAKE) prefix=`pwd`/debian/tmp/usr install
57## /etc
58##      mkdir -p debian/tmp/etc
59        cp -r install/etc/* debian/tmp/etc/
60## /usr/sbin
61# TODO laisser les scripts dans /usr/share et faire des liens
62# symboliques (ou pas)
63##      mkdir -p debian/tmp/usr/sbin
64        cp install/scripts/alternc.install debian/tmp/usr/sbin
65## /usr/share
66##      mkdir -p debian/tmp/usr/share/alternc/1.0/install
67        cp -r install/scripts/* debian/tmp/usr/share/alternc/1.0/install
68        cp -r bureau debian/tmp/var/alternc/
69## /usr/lib
70# installation des binaires
71        for i in mail_add mem_add quota_get db_create mail_del mem_del quota_edit du.pl quota_edit.sh quota_get.sh ;  \
72        do cp src/$$i debian/tmp/usr/lib/alternc ; \
73        done
74# installation de sqlbackup
75        cp -r sqlbackup debian/tmp/usr/lib/alternc/
76# installation de webalizer
77        cp -r webalizer debian/tmp/usr/lib/alternc/
78       
79##      mkdir -p debian/tmp/usr/lib/alternc/system
80        cp -r dns/* debian/tmp/usr/lib/alternc/system/
81
82##      mkdir -p debian/tmp/var/log/alternc
83##      mkdir -p debian/tmp/var/run/alternc
84       
85        /usr/bin/find debian/tmp -type d -name CVS | xargs rm -rf
86
87## moved to alternc.install
88##      chown 0.33 debian/tmp/etc/alternc -R
89##      chown 33.33 debian/tmp/etc/webalizer -R
90
91        pushd debian/tmp/usr/lib/alternc ; \
92        chmod a+rx,a-w,u+s mail_add mail_del quota_edit quota_get mem_add mem_del db_create du.pl; \
93        chmod a+rx,a-w webalizer/*  ; \
94        chown root.root mail_add mail_del quota_edit quota_get mem_add mem_del db_create ; \
95        popd
96
97        pushd debian/tmp/usr/share/alternc/1.0/install ; \
98        chmod a+x alternc.install initrep.sh ldap.sh mysql.sh newone.php ; \
99        popd
100
101#       dh_install --prefix=install/alternc
102
103# This single target is used to build all the packages, all at once, or
104# one at a time. So keep in mind: any options passed to commands here will
105# affect _all_ packages. Anything you want to only affect one package
106# should be put in another target, such as the install target.
107
108binary-common: build install
109        dh_testdir
110        dh_testroot
111        dh_installchangelogs
112        dh_installdocs
113#       dh_installexamples
114#       dh_installmenu
115        dh_installdebconf
116#       dh_installlogrotate
117#       dh_installemacsen
118#       dh_installpam
119#       dh_installmime
120#       dh_installinit
121#       dh_installman
122        dh_installcron
123#       dh_installinfo
124#       dh_undocumented
125#       dh_installman
126        dh_strip
127        dh_link
128        dh_compress
129        dh_fixperms
130
131
132#       dh_makeshlibs
133        dh_installdeb
134        dh_perl
135#       dh_shlibdeps
136        dh_gencontrol -- -cdebian/control
137        dh_md5sums
138        dh_builddeb
139
140# Build architecture independant packages using the common target.
141binary-indep: build install binary-common
142# (Uncomment this next line if you have such packages.)
143#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
144
145# Build architecture dependant packages using the common target.
146binary-arch: build install binary-common
147#       $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
148
149# Any other binary targets build just one binary package at a time.
150# binary-%: build install
151#       make -f debian/rules binary-common DH_OPTIONS=-p$*
152
153# binary: binary-indep binary-arch
154# .PHONY: build clean binary-indep binary-arch binary install
155
156binary: binary-common
157
158.PHONY: build clean binary install
Note: See TracBrowser for help on using the repository browser.