File: rules

package info (click to toggle)
gridsite 3.0.0~20180202git2fdbc6f-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,460 kB
  • sloc: ansic: 16,195; perl: 1,183; makefile: 476; sh: 386; xml: 252
file content (92 lines) | stat: -rwxr-xr-x 2,918 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

INSTALLDIR = $(CURDIR)/debian/tmp

_prefix = /usr
_bindir = $(_prefix)/bin
_sbindir = $(_prefix)/sbin
_libdir = $(_prefix)/lib
_includedir = $(_prefix)/include
_sysconfdir = /etc
_localstatedir = /var
_datadir = $(_prefix)/share
_mandir = $(_datadir)/man
_docdir = $(_datadir)/doc

%:
	dh $@ --with apache2

override_dh_auto_build:
	cd src && \
	$(MAKE) build prefix=/usr libdir=lib/$(DEB_HOST_MULTIARCH) \
	    CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"

override_dh_auto_clean:
	cd src && \
	$(MAKE) clean

	rm -rf doc/doxygen
	rm -f doc/*.1.html
	rm -f doc/*.8.html
	rm -f src/doxygen_sqlite3.db

override_dh_auto_install:
	cd src && \
	$(MAKE) install install-ws DESTDIR=$(INSTALLDIR) \
		prefix=/usr libdir=lib/$(DEB_HOST_MULTIARCH)

	# Change cgi scripts location
	mkdir -m 0755 -p $(INSTALLDIR)$(_libdir)/gridsite/cgi-bin
	mv $(INSTALLDIR)$(_sbindir)/*.cgi \
	   $(INSTALLDIR)$(_libdir)/gridsite/cgi-bin
	rmdir $(INSTALLDIR)$(_sbindir)

	# Let dh_apache2 handle module installation
	rm -rf $(INSTALLDIR)$(_libdir)/$(DEB_HOST_MULTIARCH)/httpd

	# Let debhelper do the compression
	gunzip $(INSTALLDIR)$(_mandir)/man*/*

	# This is not really useful
	rm $(INSTALLDIR)$(_libdir)/$(DEB_HOST_MULTIARCH)/libgridsite_globus.*
	rm $(INSTALLDIR)$(_libdir)/$(DEB_HOST_MULTIARCH)/libgridsite_nossl.*

	# Remove these - docs are installed using the debian/*.docs files
	rm -rf $(INSTALLDIR)$(_datadir)/doc

	# Set up root area to serve files from
	mkdir -m 0755 -p $(INSTALLDIR)$(_localstatedir)/lib/gridsite
	mkdir -m 0755 -p $(INSTALLDIR)$(_sysconfdir)/gridsite
	install -m 0644 debian/gridsitehead.txt \
	   $(INSTALLDIR)$(_sysconfdir)/gridsite/gridsitehead.txt
	install -m 0644 debian/gridsitefoot.txt \
	   $(INSTALLDIR)$(_sysconfdir)/gridsite/gridsitefoot.txt
	install -m 0644 debian/root-level.gacl \
	   $(INSTALLDIR)$(_sysconfdir)/gridsite/.gacl

	mkdir -m 0755 -p $(INSTALLDIR)$(_sysconfdir)/grid-security/dn-lists
	mkdir -m 0755 -p $(INSTALLDIR)$(_sysconfdir)/grid-security/vomsdir
	mkdir -m 0755 -p $(INSTALLDIR)$(_localstatedir)/cache/mod_gridsite

	mkdir -m 0755 -p $(INSTALLDIR)$(_datadir)/apache2/icons
	uudecode -o $(INSTALLDIR)$(_datadir)/apache2/icons/gridsitelogo.png \
	   debian/gridsitelogo.png.uu

	chown www-data.www-data \
	  $(INSTALLDIR)$(_localstatedir)/lib/gridsite \
	  $(INSTALLDIR)$(_sysconfdir)/gridsite/.gacl \
	  $(INSTALLDIR)$(_sysconfdir)/gridsite/gridsitehead.txt \
	  $(INSTALLDIR)$(_sysconfdir)/gridsite/gridsitefoot.txt \
	  $(INSTALLDIR)$(_sysconfdir)/grid-security/dn-lists \
	  $(INSTALLDIR)$(_localstatedir)/cache/mod_gridsite

override_dh_missing:
	dh_missing -i --fail-missing

override_dh_strip:
	dh_strip -a --dbgsym-migration='gridsite-dbg (<< 3.0.0~), libgridsite-dbg (<< 3.0.0~)'

override_dh_fixperms:
	dh_fixperms -a -X var/lib/gridsite -X etc/gridsite \
		       -X var/cache/mod_gridsite -X etc/grid-security/dn-lists