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
|
#!/usr/bin/make -f
# -*- makefile -*-
export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
export systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)
ifeq ($(DEB_HOST_ARCH_OS),linux)
CONFIGURE_EXTRA_FLAGS = \
--disable-init-scripts
endif
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- --enable-static=no \
--with-systemconfigdir=/etc/default $(CONFIGURE_EXTRA_FLAGS)
override_dh_auto_install:
dh_auto_install
: # Clean up duplicate/unneeded copyright/installation files
rm -f $(CURDIR)/debian/tmp/usr/share/doc/freeipmi/COPYING*
rm -f $(CURDIR)/debian/tmp/usr/share/doc/freeipmi/DISCLAIMER*
rm -f $(CURDIR)/debian/tmp/usr/share/doc/freeipmi/INSTALL
rm -f $(CURDIR)/debian/tmp/usr/share/doc/freeipmi/ChangeLog
: # chrpath -- operate only on files (not on still dangling symlinks)
/usr/bin/find $(CURDIR)/debian/*/usr/sbin -type f \
| xargs grep -L '#!/bin/sh' \
| xargs chrpath -d
chrpath -d $(CURDIR)/debian/*/usr/lib/*/*.so.*
: # assure no dir.gz
rm -f $(CURDIR)/debian/tmp/usr/share/info/dir
override_dh_install:
: # We don't need the libtool metadata
dh_install -X.la
override_dh_installlogrotate:
dh_installlogrotate --name=bmc-watchdog
override_dh_fixperms-indep:
dh_fixperms
: # since it contains sensitive information
chmod 640 $(CURDIR)/debian/freeipmi-common/etc/freeipmi/freeipmi.conf
chown root:adm $(CURDIR)/debian/freeipmi-common/etc/freeipmi/freeipmi.conf
override_dh_installchangelogs:
dh_installchangelogs --keep
override_dh_link:
dh_link
for i in $$(awk '/^Package:/{print $$2}' debian/control | grep -v freeipmi-common); do \
dh_link -p $${i} usr/share/doc/freeipmi-common usr/share/doc/$${i}/doc ; \
done
ifeq ($(DEB_HOST_ARCH_OS),linux)
override_dh_installsystemd:
: # Use Debian specific service files with "matching" names
dh_installsystemd -pfreeipmi-bmc-watchdog \
--name=bmc-watchdog --no-enable --no-start
dh_installsystemd -pfreeipmi-ipmidetect \
--name=ipmidetectd --no-enable --no-start
dh_installsystemd -pfreeipmi-ipmiseld \
--name=ipmiseld
endif
ifneq ($(DEB_HOST_ARCH_OS),linux)
override_dh_installinit:
dh_installinit -pfreeipmi-bmc-watchdog \
--name=bmc-watchdog --no-enable --no-start
dh_installinit -pfreeipmi-ipmidetect \
--name=ipmidetectd --no-enable --no-start
dh_installinit -pfreeipmi-ipmiseld \
--name=ipmiseld
endif
|