source: debian/rules @ 218

Revision 218, 3.4 KB checked in by anarcat, 9 years ago (diff)

[project @ alternc: changeset 2004-05-19 04:08:56 by anonymous]
install alternc.conf and template.conf using install with specific
modes

Original author: anonymous
Date: 2004-05-19 04:08:56

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