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
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=libfwbuilder
pkgver=2.0.3
prefix := /usr
SHELL = /bin/bash
CC = gcc
CFLAGS := -O2
CXX = g++
CXXFLAGS := -O2
IE := install -m755 -s
ID := install -m644
CHMOD := chmod
# Some special build options
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
CXXFLAGS += -g
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
IE := install -m755
endif
endif
DH_COMPAT=3
export DH_COMPAT
# the dbs rules
TAR_DIR := $(package)-$(pkgver)
include /usr/share/dbs/dbs-build.mk
# dpkg-arch rules
ifeq (,$(DEB_BUILD_GNU_TYPE))
include /usr/share/dbs/dpkg-arch.mk
endif
configure_args := --prefix=${prefix} \
--mandir=${prefix}/share/man \
--infodir=${prefix}/share/info \
--with-docdir=${prefix}/share/doc/libfwbuilder \
--with-templatedir=${prefix}/share/libfwbuilder \
--localstatedir=/var \
--sharedstatedir=/var \
--sysconfdir=/etc \
--with-openssl
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
configure_args += --enable-x-compile --build=$(DEB_BUILD_GNU_TYPE)
endif
built = $(STAMP_DIR)/build
installed = $(STAMP_DIR)/install
configed = $(STAMP_DIR)/config
configure: setup $(configed)
$(configed):
$(checkdir)
cd $(BUILD_TREE) && \
CC="$(CC) $(CFLAGS) $(DEBUG)" \
CXX="$(CXX) $(CXXFLAGS) $(DEBUG)" \
./autogen.sh $(configure_args)
touch $@
build: configure $(built)
$(built):
( cd $(BUILD_TREE) && \
QTDIR=/usr/share/qt \
MOC=/usr/bin/moc \
UIC=/usr/bin/uic \
QMAKESPEC=linux-g++ \
$(MAKE) )
touch $@
install: build $(installed)
$(installed):
$(checkroot)
dh_clean -k
dh_installdirs
dh_installmenu
cwd=`pwd` ; \
set -e ; \
( cd $(BUILD_TREE) && \
$(MAKE) install INSTALL_ROOT=$$cwd/debian/tmp )
touch $@
clean:
$(checkroot)
dh_clean
rm -rf $(STAMP_DIR) $(SOURCE_DIR)
rm -f debian/files.saved debian/files
rm -f debian/*.dirs debian/*.files debian/*.menu debian/*.examples
rm -f debian/*.undocumented debian/*.doc-base debian/*.manpages
rm -f debian/*.install
rm -rf build
rm -f $$(find . -type l) $$(find . -name "*~" -o -name "*.o")
rm -rf debian/$(package) debian/$(package)-{doc,dev}
rm -rf debian/{files*,*substvars*,*.gz} core
rm -f $$(find * -name "*.orig")
binary-indep: checkroot build install
# Nothing to do here by default.
#$(checkroot)
#dh_clean -k -i
#dh_installdocs -i
#dh_installchangelogs -i
#dh_link -i
#dh_compress -i
#dh_fixperms -i
#dh_installdeb -i
#dh_gencontrol -i -- -isp -VUpstream=$$(sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog)
#dh_md5sums -i
#dh_fixperms -i
#dh_builddeb -i
binary-arch: checkroot build install
$(checkroot)
dh_install --sourcedir=debian/tmp --list-missing -a
dh_installdocs -a
dh_installexamples -a
dh_installman -a
dh_installchangelogs -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
# dh_makeshlibs -V "libfwbuilder6 (>= $$(sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog)-0), libfwbuilder6 (<< $$(sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog).0-0)"
dh_makeshlibs -V "libfwbuilder6 (>= $$(sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog)-0)" -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a -u-isp
dh_md5sums -a
dh_fixperms -a
dh_builddeb -a
if egrep "^DEBUG" debian/rules; then false; fi
binary: binary-indep binary-arch
define checkdir
test -f debian/rules
endef
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|