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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# The following fails on ia64, because of alignment stuff
# CFLAGS = -Wall -g
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
# The following Debian defaults don't work...need to figure out what's
# wrong:
# LDFLAGS="-Wl,-z,defs"
chmod +x ltmain.sh configure
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --with-varpath=/var/lib/openhpi --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-daemon --enable-clients --enable-cpp_wrappers --enable-snmp_client --enable-watchdog --enable-ipmi --enable-sysfs --enable-snmp_bc --enable-ipmidirect --enable-remote_client --enable-simulator CFLAGS="$(CFLAGS)"
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
$(MAKE)
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
chmod -x ltmain.sh configure
[ ! -f Makefile ] || $(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/openhpi.
# Installing into debian/tmp, then using dh_install and the
# package.install file to break up the files into packages.
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
# openhpi is an empty package, but an empty .install file can't be
# represented in a diff
touch debian/openhpi.install
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs -i
dh_installdocs -i --all debian/README.Debian
dh_installexamples -i
# dh_install --sourcedir=debian/tmp -i
# dh_installmenu -i
# dh_installdebconf -i
# dh_installlogrotate -i
# dh_installemacsen -i
# dh_installpam -i
# dh_installmime -i
# dh_python -i
# dh_installinit -i
# dh_installcron -i
# dh_installinfo -i
# dh_installwm -i
# dh_installudev -i
dh_lintian -i
# dh_undocumented -i
dh_installman -i
dh_link -i
dh_compress -i
dh_fixperms -i
# dh_perl -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs -a
dh_installdocs -a --all debian/README.Debian
dh_installexamples -a
# Using the upstream init script...better way to do this?
rm -f debian/openhpid.init
mv debian/tmp/etc/init.d/openhpid debian/openhpid.init
# For now, not shipping the .la files because they are a support
# liability as far as version dependencies go
rm -f debian/tmp/usr/lib/*.la
rm -f debian/tmp/usr/lib/openhpi/*.la
# The following are for specific documentation files that upstream
# puts in a nonstandard place:
mv debian/tmp/usr/share/doc/openhpi-*/README debian/libopenhpi2/usr/share/doc/libopenhpi2/
mv debian/tmp/usr/share/doc/openhpi-*/README.daemon debian/libopenhpi2/usr/share/doc/libopenhpi2/
# Our debian/copyright file includes the contents of this one
rm debian/tmp/usr/share/doc/openhpi-*/COPYING
# Upstream doesn't "install" these files anywhere and they're useful:
cp plugins/ilo2_ribcl/OpenHPI_ProLiant_DevGuide.pdf debian/openhpi-plugin-ilo2-ribcl/usr/share/doc/openhpi-plugin-ilo2-ribcl/
cp plugins/oa_soap/OpenHPI_Blade_DevGuide.pdf debian/openhpi-plugin-oa-soap/usr/share/doc/openhpi-plugin-oa-soap/
cp plugins/snmp_bc/bc2hpi.pdf debian/openhpi-plugin-snmp-bc/usr/share/doc/openhpi-plugin-snmp-bc/
dh_install --sourcedir=debian/tmp --fail-missing -a
# dh_installmenu -a
# dh_installdebconf -a
# dh_installlogrotate -a
# dh_installemacsen -a
# dh_installpam -a
# dh_installmime -a
# dh_python -a
dh_installinit -a
# dh_installcron -a
# dh_installinfo -a
# dh_installwm -a
# dh_installudev -a
dh_lintian -a
# dh_undocumented -a
dh_installman -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
# dh_perl -a
dh_makeshlibs -a # Could add -V here
dh_installdeb -a
dh_shlibdeps -l "debian/libopenhpi2/usr/lib:debian/openhpi-plugin-snmp/usr/lib:/usr/lib/libfakeroot" -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|