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
|
#!/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=fwbuilder
pkgver=2.0.9
prefix := /usr
SHELL = /bin/bash
CC = gcc
CPP = cpp
CXX = g++
CFLAGS := -O2
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
# 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-iconsdir=${prefix}/share/pixmaps/fwbuilder \
--with-docdir=${prefix}/share/doc/fwbuilder \
--with-templatedir=${prefix}/share/fwbuilder \
--localstatedir=/var \
--sharedstatedir=/var \
--sysconfdir=/etc
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) && \
./autogen.sh $(configure_args)
touch $@
build: configure $(built)
$(built):
( cd $(BUILD_TREE) && $(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 && \
install -d $$cwd/debian/tmp/usr/share/pixmaps/fwbuilder/ ; \
install $$cwd/$(BUILD_TREE)/src/gui/icons/firewall.xpm \
$$cwd/debian/tmp/usr/share/pixmaps/fwbuilder/ ; \
$(CHMOD) 0644 $$cwd/debian/tmp/usr/share/pixmaps/fwbuilder/* )
# install -d $cwd/debian/tmp/usr/share/doc/fwbuilder/examples
# install $cwd/debian/contrib/fwbuilder.* \
# $cwd/debian/tmp/usr/share/doc/fwbuilder/examples
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 debian/*.docs debian/dirs debian/install
rm -f $$(find . -type l) $$(find . -name "*~" -o -name "*.o")
rm -rf debian/$(package) debian/$(package)-{doc,dev}
rm -f debian/manpages debian/menu
rm -rf debian/{files*,*substvars*,*.gz} core
rm -f $$(find * -name "*.orig")
binary-indep: checkroot build install
$(checkroot)
dh_install --sourcedir=debian/tmp --list-missing -i
dh_installdocs -i
dh_installexamples -i
dh_installchangelogs -i debian/tmp/usr/share/doc/fwbuilder/ChangeLog
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_installmenu -a
dh_installman -a
dh_installexamples -a
dh_installchangelogs -a debian/tmp/usr/share/doc/fwbuilder/ChangeLog
dh_link -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a -- -isp -VUpstream=$$(sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog)
dh_strip -a
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
|