File: rules

package info (click to toggle)
tiger 1%3A3.2.4~rc1-3.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,884 kB
  • sloc: sh: 15,066; ansic: 1,933; perl: 573; makefile: 330; sql: 38
file content (118 lines) | stat: -rwxr-xr-x 4,252 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/make -f
# debian/rules file for Tiger using debhelper
# GNU copyright 1997 to 1999 by Joey Hess.
# (c) 2001-2018 Javier Fernández-Sanguino <jfs@debian.org>

# We depend on bashisms
SHELL=/bin/bash

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
# export DH_COMPAT=11

build: build-arch build-indep

build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
	autoconf
	dh_auto_configure -- --with-tigerhome=/usr/lib/tiger --with-tigerwork=/var/lib/tiger/work --with-tigerlog=/var/log/tiger --with-tigerbin=/usr/sbin --with-tigerconfig=/etc/tiger --prefix=/usr --mandir=/usr/share/man
	$(MAKE) all
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	[ -f Makefile ] && $(MAKE) distclean || $(MAKE) -f Makefile.in distclean
	-rm -f config.{status,log,cache}
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) install DESTDIR=debian/tiger/
	# This is not needed
	-rm -rf debian/tiger/usr/lib/tiger/man/
	# Fix permission of all shell files
	egrep -rl "^#\!/bin/.*sh" debian/tiger | \
		while read shell ; do chmod a+x $$shell; done
	# Remove CVS directories
	-find debian/tiger/ -type d -a -name "CVS" |xargs rm -rf
	# Remove the systems that do not apply to the tiger-otheros package
	# Currently only Linux and default are kept
	# AIX/  default/  HPUX/  IRIX/  Linux/  NeXT/  SunOS/  UNICOS/ UNICOSMK
	# TODO: make this for all dirs save for Linux and default (i.e.
	# make this 'mv' more generic)
	mv debian/tiger/usr/lib/tiger/systems/{AIX,HPUX,IRIX,NeXT,SunOS,UNICOS,UNICOSMK,Tru64,MacOSX} debian/tiger-otheros/usr/lib/tiger/systems/
	# Install configuration files
	install -m 600 cronrc debian/tiger/etc/tiger/
	# Note: Do not install tigerrc, it is handled by ucf since it is edited by Debconf prompts:
	-rm -f debian/tiger/etc/tiger/tigerrc
	install -m 600 debian/tiger.default debian/tiger/etc/default/tiger
	install -m 600 debian/debian.ignore debian/tiger/etc/tiger/tiger.ignore
	install -m 644 version.h debian/tiger/usr/lib/tiger/
	# Adjust the permissions of directories that might contain confidential information
	chmod 0700 debian/tiger/var/lib/tiger/work
	chmod 0700 debian/tiger/var/log/tiger
	# Create symbolic links for Linux versions 3, 4, 5, 6 and default
	[ -e debian/tiger/usr/lib/tiger/systems/Linux/3 ] || \
		ln -fs 2 debian/tiger/usr/lib/tiger/systems/Linux/3
	[ -e debian/tiger/usr/lib/tiger/systems/Linux/4 ] || \
		ln -fs 2 debian/tiger/usr/lib/tiger/systems/Linux/4
	[ -e debian/tiger/usr/lib/tiger/systems/Linux/5 ] || \
		ln -fs 2 debian/tiger/usr/lib/tiger/systems/Linux/5
	[ -e debian/tiger/usr/lib/tiger/systems/Linux/6 ] || \
		ln -fs 2 debian/tiger/usr/lib/tiger/systems/Linux/6
	[ -e debian/tiger/usr/lib/tiger/systems/Linux/default ] || \
		ln -fs 2 debian/tiger/usr/lib/tiger/systems/Linux/default
	# Remove unneeded Makefile files.
	rm -f debian/tiger/usr/lib/tiger/doc/Makefile
	rm -f debian/tiger/usr/lib/tiger/doc/Makefile.in
	# Add Desktop file
	mkdir -p $(CURDIR)/debian/tiger/usr/share/applications/
	install -m 0644 $(CURDIR)/debian/tiger.desktop $(CURDIR)/debian/tiger/usr/share/applications/

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_install
	dh_installdebconf	
	dh_installdocs
	dh_installexamples tigerrc* site* cronrc issue* debian/server.ignore
	dh_installmenu
	dh_installcron
	dh_installman man/tiger.8 man/tigexp.8 man/tigercron.8
	dh_installinfo
	dh_installchangelogs CHANGES
	dh_lintian
	dh_link
	dh_strip -XHPUX -XSunOS -XAIX -XIRIX -XNeXT -XMacOSX
	dh_compress
	dh_fixperms  \
		--exclude var/lib/tiger/work \
		--exclude var/log/tiger
	dh_installdeb
	dh_shlibdeps -XHPUX -XSunOS -XAIX -XIRIX -XNeXT -XMacOSX
	dh_gencontrol
	dh_md5sums
	dh_builddeb

update-dsa:
# Updated Debian Security Advisories
# This target should only be run by the Debian maintainer (which needs
# to fix the update_advisories appropriately)
	cd systems/Linux/2 && sh update_advisories.sh
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install