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
|
#!/usr/bin/make -f
# -*- makefile -*-
INSTALLDIR = $(CURDIR)/debian/tmp
%:
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)/usr/lib/gridsite/cgi-bin
mv $(INSTALLDIR)/usr/sbin/*.cgi \
$(INSTALLDIR)/usr/lib/gridsite/cgi-bin
rmdir $(INSTALLDIR)/usr/sbin
# Let dh_apache2 handle module installation
rm -rf $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/httpd
# Let debhelper do the compression
gunzip $(INSTALLDIR)/usr/share/man/man*/*
# This is not really useful
rm $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/libgridsite_globus.*
rm $(INSTALLDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/libgridsite_nossl.*
# Remove these - docs are installed using the debian/*.docs files
rm -rf $(INSTALLDIR)/usr/share/doc
# Set up root area to serve files from
mkdir -m 0755 -p $(INSTALLDIR)/var/lib/gridsite
mkdir -m 0755 -p $(INSTALLDIR)/etc/gridsite
install -m 0644 debian/gridsitehead.txt \
$(INSTALLDIR)/etc/gridsite/gridsitehead.txt
install -m 0644 debian/gridsitefoot.txt \
$(INSTALLDIR)/etc/gridsite/gridsitefoot.txt
install -m 0644 debian/root-level.gacl \
$(INSTALLDIR)/etc/gridsite/.gacl
mkdir -m 0755 -p $(INSTALLDIR)/etc/grid-security/dn-lists
mkdir -m 0755 -p $(INSTALLDIR)/etc/grid-security/vomsdir
mkdir -m 0755 -p $(INSTALLDIR)/var/cache/mod_gridsite
mkdir -m 0755 -p $(INSTALLDIR)/usr/share/apache2/icons
uudecode -o $(INSTALLDIR)/usr/share/apache2/icons/gridsitelogo.png \
debian/gridsitelogo.png.uu
chown www-data.www-data \
$(INSTALLDIR)/var/lib/gridsite \
$(INSTALLDIR)/etc/gridsite/.gacl \
$(INSTALLDIR)/etc/gridsite/gridsitehead.txt \
$(INSTALLDIR)/etc/gridsite/gridsitefoot.txt \
$(INSTALLDIR)/etc/grid-security/dn-lists \
$(INSTALLDIR)/var/cache/mod_gridsite
override_dh_fixperms:
dh_fixperms -a -X var/lib/gridsite -X etc/gridsite \
-X var/cache/mod_gridsite -X etc/grid-security/dn-lists
|