| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
name = myproxy |
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow |
| 7 |
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs |
| 8 |
|
| 9 |
INSTALLDIR = debian/tmp |
| 10 |
|
| 11 |
_docdir = /usr/share/doc/$(name) |
| 12 |
|
| 13 |
%: |
| 14 |
dh $@ |
| 15 |
|
| 16 |
override_dh_auto_configure: |
| 17 |
dh_auto_configure -- \ |
| 18 |
--disable-static \ |
| 19 |
--includedir=/usr/include/globus \ |
| 20 |
--with-voms=/usr \ |
| 21 |
--with-openldap=/usr \ |
| 22 |
--with-kerberos5=/usr \ |
| 23 |
--with-sasl2=/usr |
| 24 |
|
| 25 |
override_dh_auto_install: |
| 26 |
dh_auto_install |
| 27 |
|
| 28 |
# Remove libtool archives (.la files) |
| 29 |
rm $(INSTALLDIR)/usr/lib/*/*.la |
| 30 |
|
| 31 |
# No need for myproxy-server-setup since the debian package will |
| 32 |
# perform the needed setup |
| 33 |
rm $(INSTALLDIR)/usr/sbin/myproxy-server-setup |
| 34 |
|
| 35 |
# Move documentation to default debian location |
| 36 |
mkdir -p $(INSTALLDIR)$(_docdir)/extras |
| 37 |
for FILE in login.html myproxy-accepted-credentials-mapapp \ |
| 38 |
myproxy-cert-checker myproxy-certificate-mapapp \ |
| 39 |
myproxy-certreq-checker myproxy-crl.cron myproxy.cron \ |
| 40 |
myproxy-get-delegation.cgi myproxy-get-trustroots.cron \ |
| 41 |
myproxy-passphrase-policy myproxy-revoke ; do \ |
| 42 |
mv $(INSTALLDIR)/usr/share/$(name)/$$FILE \ |
| 43 |
$(INSTALLDIR)$(_docdir)/extras ; \ |
| 44 |
done |
| 45 |
|
| 46 |
for FILE in PROTOCOL README.sasl REPOSITORY VERSION ; do \ |
| 47 |
mv $(INSTALLDIR)/usr/share/$(name)/$$FILE \ |
| 48 |
$(INSTALLDIR)$(_docdir) ; \ |
| 49 |
done |
| 50 |
|
| 51 |
# Remove irrelevant example configuration files |
| 52 |
for FILE in etc.inetd.conf.modifications etc.init.d.myproxy.nonroot \ |
| 53 |
etc.services.modifications etc.xinetd.myproxy etc.init.d.myproxy \ |
| 54 |
myproxy-server.service myproxy-server.conf LICENSE* ; do \ |
| 55 |
rm $(INSTALLDIR)/usr/share/$(name)/$$FILE ; \ |
| 56 |
done |
| 57 |
|
| 58 |
# Move example configuration file into place |
| 59 |
mkdir -p $(INSTALLDIR)/etc |
| 60 |
mv $(INSTALLDIR)/usr/share/$(name)/myproxy-server.config \ |
| 61 |
$(INSTALLDIR)/etc |
| 62 |
|
| 63 |
mkdir -p $(INSTALLDIR)/var/lib/$(name) |
| 64 |
chmod 700 $(INSTALLDIR)/var/lib/$(name) |
| 65 |
|
| 66 |
# Create a directory to hold myproxy owned host certificates |
| 67 |
mkdir -p $(INSTALLDIR)/etc/grid-security/$(name) |
| 68 |
|
| 69 |
# systemd unit files |
| 70 |
install -p -m 644 systemd/myproxy-server.service \ |
| 71 |
debian/myproxy-server.service |
| 72 |
install -p -m 644 systemd/myproxy-server.conf \ |
| 73 |
debian/myproxy-server.tmpfiles |
| 74 |
|
| 75 |
override_dh_installinit: |
| 76 |
dh_installinit --no-enable |
| 77 |
|
| 78 |
override_dh_installsystemd: |
| 79 |
dh_installsystemd --no-enable |
| 80 |
|
| 81 |
override_dh_fixperms: |
| 82 |
dh_fixperms -X /var/lib/$(name) |