File: rules

package info (click to toggle)
voms 2.1.0~rc0-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,208 kB
  • sloc: ansic: 11,814; cpp: 10,520; exp: 7,863; sh: 1,279; xml: 985; makefile: 844; yacc: 388; lex: 196
file content (140 lines) | stat: -rwxr-xr-x 3,243 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/usr/bin/make -f
# -*- makefile -*-

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-include /usr/share/dpkg/buildflags.mk

INSTALLDIR = $(CURDIR)/debian/tmp

_prefix = /usr
_bindir = $(_prefix)/bin
_libdir = $(_prefix)/lib
_sysconfdir = /etc
_datadir = $(_prefix)/share
_mandir = $(_datadir)/man
_docdir = $(_datadir)/doc

configure: configure-stamp

configure-stamp:
	dh_testdir

	mkdir -p src/autogen
	dh_autoreconf

	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" \
	CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -Wl,-z,defs" \
	dh_auto_configure -- \
	   --enable-docs \
	   --disable-parser-gen

	touch $@

build: build-arch build-indep

build-arch: build-stamp

build-indep: build-stamp

build-stamp: configure-stamp
	dh_testdir

	$(MAKE)

	touch $@

clean:
	dh_testdir
	dh_testroot

	if [ -r Makefile ] ; then $(MAKE) clean && $(MAKE) distclean ; fi

	dh_autoreconf_clean

	rm -rf doc/apidoc
	rm -f .test

	rm -f build-stamp configure-stamp

	dh_clean debian/voms-server.voms.init debian/voms-server.voms.default

install: build-stamp
	dh_testdir
	dh_testroot
	dh_prep

	$(MAKE) install DESTDIR=$(INSTALLDIR)

	rm -rf $(INSTALLDIR)$(_mandir)/man3
	rm $(INSTALLDIR)$(_libdir)/*/*.la

	# Remove in order to have a good upgrade path from voms 1.x
	# This file is installed in the documentation directory instead
	rm $(INSTALLDIR)$(_datadir)/voms/vomses.template

	mv $(INSTALLDIR)$(_sysconfdir)/rc.d/init.d/voms \
		debian/voms-server.voms.init
	mv $(INSTALLDIR)$(_sysconfdir)/sysconfig/voms \
		debian/voms-server.voms.default

	# /var/lock/subsys is a redhat-ism - use /var/run/voms instead
	sed -e 's!/lock/subsys!/run/voms!g' -i debian/voms-server.voms.init

	mkdir -p $(INSTALLDIR)/$(_docdir)/voms-dev/VOMS_C_API
	cp -pr doc/apidoc/api/VOMS_C_API/html \
		$(INSTALLDIR)/$(_docdir)/voms-dev/VOMS_C_API
	rm -f $(INSTALLDIR)/$(_docdir)/voms-dev/VOMS_C_API/html/installdox

	mkdir -p $(INSTALLDIR)/$(_docdir)/voms-dev/VOMS_CC_API
	cp -pr doc/apidoc/api/VOMS_CC_API/html \
		$(INSTALLDIR)/$(_docdir)/voms-dev/VOMS_CC_API
	rm -f $(INSTALLDIR)/$(_docdir)/voms-dev/VOMS_CC_API/html/installdox

	# Move binaries and manpages for alternatives
	for b in voms-proxy-init voms-proxy-info voms-proxy-destroy; do \
	    mv $(INSTALLDIR)$(_bindir)/$${b} \
	       $(INSTALLDIR)$(_bindir)/$${b}2 ; \
	    mv $(INSTALLDIR)$(_mandir)/man1/$${b}.1 \
	       $(INSTALLDIR)$(_mandir)/man1/$${b}2.1 ; \
	done

binary: binary-arch binary-indep

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdocs -a
	dh_installchangelogs -a ChangeLog
	dh_install -a
	dh_missing -a --fail-missing
	dh_installinit -a --name=voms --no-enable
	dh_installman -a
	dh_link -a
	dh_strip -a --dbgsym-migration='voms-dbg (<< 2.1.0~rc0-4~)'
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary-indep: install
	dh_testdir
	dh_testroot
	dh_installdocs -i
	dh_installchangelogs -i ChangeLog
	dh_install -i
	dh_missing -i --fail-missing
	dh_installman -i
	dh_lintian -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

.PHONY: build build-arch build-indep binary binary-arch binary-indep clean configure install