source: trunk/rules @ 47

Last change on this file since 47 was 45, checked in by bas, 14 years ago

reverting back to old installation with one single package

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_installexamples contrib/* -XCVS
74        dh_install
75        dh_link
76        dh_installdebconf
77        dh_compress
78        dh_fixperms -Xpbs_iff
79        dh_installdeb
80        dh_makeshlibs
81        dh_shlibdeps
82        dh_gencontrol
83
84        ## Do not modify any postinst/rm scripts
85        #
86        dh_installinit --noscripts
87
88        dh_md5sums
89
90        #chown -R root.root debian/torque
91        #chmod -R go=rX debian/torque
92
93        #
94        # Include pbs_mkdirs in the package, else we have to make own
95        # directories. Thanks to Jaap Dijkshoorn
96        #
97        cp buildutils/pbs_mkdirs debian/torque/usr/sbin
98
99        # Not in the standard install ;-)
100        #
101        cp src/include/rm.h debian/torque/usr/include/torque
102        cp src/include/log.h debian/torque/usr/include/torque
103
104        #
105        # pbs_iff permissions must suid root
106        #
107        chown root.root debian/torque/usr/sbin/pbs_iff
108        chmod 4755 debian/torque/usr/sbin/pbs_iff
109
110        dh_builddeb
111
112define checkdir
113        test -f debian/rules
114endef
115
116binary: binary-indep binary-arch
117
118checkroot:
119        $(checkdir)
120        test root = "`whoami`"
121
122.PHONY: binary binary-arch binary-indep clean checkroot
Note: See TracBrowser for help on using the repository browser.