source: debian/rules @ 215

Revision 215, 3.8 KB checked in by anarcat, 7 years ago (diff)

[project @ alternc: changeset 2004-05-19 03:49:25 by anonymous]
centraliser l'installation des binaires de src/ dans src/Makefile
utiliser install(1) au lieu de cp(1) pour installer les fichiers
utiliser install(1) pour choisir le mode des fichiers mettre ce mode à
4550 pour les binaires SUID et 550 pour les scripts

Original author: anonymous
Date: 2004-05-19 03:49:25

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        -pushd src/ && $(MAKE) clean && popd
41
42        dh_clean
43
44install: DH_OPTIONS=
45install: build
46        dh_testdir
47        dh_testroot
48        dh_clean -k
49        dh_installdirs
50
51
52        # Add here commands to install the package into debian/tmp.
53        #$(MAKE) prefix=`pwd`/debian/tmp/usr install
54## /etc
55##      mkdir -p debian/tmp/etc
56        cp -r install/etc/* debian/tmp/etc/
57## /usr/sbin
58# TODO laisser les scripts dans /usr/share et faire des liens
59# symboliques (ou pas)
60##      mkdir -p debian/tmp/usr/sbin
61        cp install/scripts/alternc.install debian/tmp/usr/sbin
62## /usr/share
63##      mkdir -p debian/tmp/usr/share/alternc/1.0/install
64        cp -r install/scripts/* debian/tmp/usr/share/alternc/1.0/install
65        cp -r bureau debian/tmp/var/alternc/
66## /usr/lib
67# installation des binaires
68        pushd src/ && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp && popd
69# installation de sqlbackup
70        cp -r sqlbackup debian/tmp/usr/lib/alternc/
71# installation de webalizer
72        cp -r webalizer debian/tmp/usr/lib/alternc/
73       
74##      mkdir -p debian/tmp/usr/lib/alternc/system
75        cp -r dns/* debian/tmp/usr/lib/alternc/system/
76
77##      mkdir -p debian/tmp/var/log/alternc
78##      mkdir -p debian/tmp/var/run/alternc
79       
80        /usr/bin/find debian/tmp -type d -name CVS | xargs rm -rf
81
82## moved to alternc.install
83##      chown 0.33 debian/tmp/etc/alternc -R
84##      chown 33.33 debian/tmp/etc/webalizer -R
85
86        pushd debian/tmp/usr/lib/alternc ; \
87        chmod a+rx,a-w webalizer/*  ; \
88        popd
89
90        pushd debian/tmp/usr/share/alternc/1.0/install ; \
91        chmod a+x alternc.install initrep.sh ldap.sh mysql.sh newone.php ; \
92        popd
93
94#       dh_install --prefix=install/alternc
95
96# This single target is used to build all the packages, all at once, or
97# one at a time. So keep in mind: any options passed to commands here will
98# affect _all_ packages. Anything you want to only affect one package
99# should be put in another target, such as the install target.
100
101binary-common: build install
102        dh_testdir
103        dh_testroot
104        dh_installchangelogs
105        dh_installdocs
106#       dh_installexamples
107#       dh_installmenu
108        dh_installdebconf
109#       dh_installlogrotate
110#       dh_installemacsen
111#       dh_installpam
112#       dh_installmime
113#       dh_installinit
114#       dh_installman
115        dh_installcron
116#       dh_installinfo
117#       dh_undocumented
118#       dh_installman
119        dh_strip
120        dh_link
121        dh_compress
122        dh_fixperms
123
124
125#       dh_makeshlibs
126        dh_installdeb
127        dh_perl
128#       dh_shlibdeps
129        dh_gencontrol -- -cdebian/control
130        dh_md5sums
131        dh_builddeb
132
133# Build architecture independant packages using the common target.
134binary-indep: build install binary-common
135# (Uncomment this next line if you have such packages.)
136#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
137
138# Build architecture dependant packages using the common target.
139binary-arch: build install binary-common
140#       $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
141
142# Any other binary targets build just one binary package at a time.
143# binary-%: build install
144#       make -f debian/rules binary-common DH_OPTIONS=-p$*
145
146# binary: binary-indep binary-arch
147# .PHONY: build clean binary-indep binary-arch binary install
148
149binary: binary-common
150
151.PHONY: build clean binary install
Note: See TracBrowser for help on using the repository browser.