source: trunk/rules @ 44

Last change on this file since 44 was 44, checked in by dennis, 14 years ago

Now torque_2_deb creates 8 packages just like the torque in the debian repository.

This has been done to fix a depedency problem of libopenmpi1.3 when we used our
previous build of torque.

File size: 2.9 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        dh_clean
38        -rm -f build
39        -$(MAKE) distclean
40        -rm -f `find . -name "*~"`
41        -rm -rf debian/torque debian/files* core
42        -rm -f debian/*.debhelper
43
44binary-indep: checkroot build
45        $(checkdir)
46# There are no architecture-independent files to be uploaded
47# generated by this package.  If there were any they would be
48# made here.
49
50binary-arch: checkroot build
51        $(checkdir)
52        chmod 700 buildutils/pbs_mkdirs
53        DESTDIR=`pwd`/debian/torque buildutils/pbs_mkdirs\
54                -v -C./src/tools/chk_tree -d `pwd`/debian/torque/var/spool/torque all
55
56        $(MAKE) DESTDIR=`pwd`/debian/torque install
57
58          # OLD PBS stuff before 2.1.0
59          #libdir=`pwd`/debian/torque/usr/lib/torque \
60          #includedir=`pwd`/debian/torque/usr/include/torque \
61          #PBS_SERVER_HOME=`pwd`/debian/torque/var/spool/torque \
62
63        #debian/patch_gui_cmds.sh /usr/lib/torque
64
65        dh_testdir
66        dh_testroot
67        dh_installdirs
68        dh_installchangelogs CHANGELOG
69        dh_installdocs -Xcontrib README.mpiexec
70        dh_installexamples contrib/* -XCVS
71        dh_install
72        dh_link
73        dh_installdebconf
74        dh_compress
75        dh_fixperms -Xpbs_iff
76        dh_installdeb
77        dh_makeshlibs
78        dh_shlibdeps
79        dh_gencontrol
80
81        ## Do not modify any postinst/rm scripts
82        #
83        dh_installinit --noscripts
84
85        dh_md5sums
86
87        #chown -R root.root debian/torque
88        #chmod -R go=rX debian/torque
89
90        #
91        # Include pbs_mkdirs in the package, else we have to make own
92        # directories. Thanks to Jaap Dijkshoorn
93        #
94        cp buildutils/pbs_mkdirs debian/torque/usr/sbin
95
96        # Not in the standard install ;-)
97        #
98        cp src/include/rm.h debian/torque/usr/include/torque
99        cp src/include/log.h debian/torque/usr/include/torque
100
101        #
102        # pbs_iff permissions must suid root
103        #
104        chown root.root debian/torque/usr/sbin/pbs_iff
105        chmod 4755 debian/torque/usr/sbin/pbs_iff
106
107        mkdir -p debian/torque-common/var/spool/torque/spool
108        mkdir -p debian/torque-common/var/spool/torque/checkpoint
109        mkdir -p debian/torque-common/var/spool/torque/aux
110        mkdir -p debian/torque-common/var/spool/torque/undelivered
111
112        chmod 1777 debian/torque-common/var/spool/torque/spool
113        chmod 1777 debian/torque-common/var/spool/torque/undelivered
114
115        chmod 0755 debian/torque-common/var/spool/torque/checkpoint
116        chmod 0755 debian/torque-common/var/spool/torque/aux
117
118        dh_builddeb
119
120define checkdir
121        test -f debian/rules
122endef
123
124binary: binary-indep binary-arch
125
126checkroot:
127        $(checkdir)
128        test root = "`whoami`"
129
130.PHONY: binary binary-arch binary-indep clean checkroot
Note: See TracBrowser for help on using the repository browser.