source: branches/2.4/rules @ 82

Last change on this file since 82 was 50, checked in by bas, 13 years ago

new version with security fix

File size: 2.6 KB
Line 
1#!/usr/bin/make -f
2# Made with the aid of debmake, by Christoph Lameter,
3# based on the sample debian/rules file for GNU hello by Ian Jackson.
4#
5# Authors: Bas van der Vlies
6# Desc.  : Builds a torque deb package from the sources
7#
8# SVN INFO:
9#       $Id: rules 2385 2006-11-03 07:20:35Z bas $
10#
11#       compat=4
12
13package=torque
14
15patched: 
16        $(checkdir)
17
18        # Make scripts executable
19        #
20        chmod +x debian/patches/apply
21        chmod +x debian/conf_torque
22        chmod +x debian/patches/submit_filter.patch
23
24        # apply some patches
25        debian/patches/apply
26
27        touch patched
28
29build: patched
30        $(checkdir)
31        debian/conf_torque
32        $(MAKE)
33        touch build
34
35clean:
36        $(checkdir)
37        -rm -f build
38        -$(MAKE) distclean
39        -rm -f `find . -name "*~"`
40        -rm -rf debian/torque debian/files* core
41        -rm -f debian/*.debhelper
42
43binary-indep: checkroot build
44        $(checkdir)
45# There are no architecture-independent files to be uploaded
46# generated by this package.  If there were any they would be
47# made here.
48
49binary-arch: checkroot build
50        $(checkdir)
51        -rm -rf debian/torque
52        install -d debian/torque
53        cd debian/torque && install -d `cat ../dirs`
54
55        chmod 700 buildutils/pbs_mkdirs
56        DESTDIR=`pwd`/debian/torque buildutils/pbs_mkdirs\
57                -v -C./src/tools/chk_tree -d `pwd`/debian/torque/var/spool/torque all
58
59        $(MAKE) DESTDIR=`pwd`/debian/torque install
60
61          # OLD PBS stuff before 2.1.0
62          #libdir=`pwd`/debian/torque/usr/lib/torque \
63          #includedir=`pwd`/debian/torque/usr/include/torque \
64          #PBS_SERVER_HOME=`pwd`/debian/torque/var/spool/torque \
65
66        #debian/patch_gui_cmds.sh /usr/lib/torque
67
68        dh_testdir
69        dh_testroot
70        dh_installdirs
71        dh_installchangelogs CHANGELOG
72        #dh_installdocs -Xcontrib README.mpiexec
73        dh_installdocs -Xcontrib
74        dh_installexamples contrib/* -XCVS
75        dh_install
76        dh_link
77        dh_installdebconf
78        dh_compress
79        dh_fixperms -Xpbs_iff
80        dh_installdeb
81        dh_makeshlibs
82        dh_shlibdeps
83        dh_gencontrol
84
85        ## Do not modify any postinst/rm scripts
86        #
87        dh_installinit --noscripts
88
89        dh_md5sums
90
91        #chown -R root.root debian/torque
92        #chmod -R go=rX debian/torque
93
94        #
95        # Include pbs_mkdirs in the package, else we have to make own
96        # directories. Thanks to Jaap Dijkshoorn
97        #
98        cp buildutils/pbs_mkdirs debian/torque/usr/sbin
99
100        # Not in the standard install ;-)
101        #
102        cp src/include/rm.h debian/torque/usr/include/torque
103        cp src/include/log.h debian/torque/usr/include/torque
104
105        #
106        # pbs_iff permissions must suid root
107        #
108        chown root.root debian/torque/usr/sbin/pbs_iff
109        chmod 4755 debian/torque/usr/sbin/pbs_iff
110
111        dh_builddeb
112
113define checkdir
114        test -f debian/rules
115endef
116
117binary: binary-indep binary-arch
118
119checkroot:
120        $(checkdir)
121        test root = "`whoami`"
122
123.PHONY: binary binary-arch binary-indep clean checkroot
Note: See TracBrowser for help on using the repository browser.