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
|
#!/usr/bin/make -f
# NAME
# debian/rules -- Debian build rules for GNATS
#
# DESCRIPTION
# This Makefile uses the CDBS makefiles to wrap the common package building
# steps necessary to make the gnats binary packages.
#
# COPYRIGHT
# Copyright (c) 2004 Chad Walstrom <chewie@debian.org>
#
# LICENSE
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc., 59
# Temple Place, Suite 330, Boston, MA 02111-1307 USA.
#
################################################################################
#DH_VERBOSE=1
# Previous versions of gnats had problems with gcc optimized
#DEB_BUILD_OPTIONS = noopt
################################################################################
# CDBS Includes
################################################################################
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
# Bison override
YACC = bison
INSTALL = install
INSTALL_INFO = /bin/true
# VARIABLES
DATADIR := $(DEB_CONFIGURE_LOCALSTATEDIR)/lib/gnats
HOMEDIR := $(DATADIR)
DBDIR := $(DATADIR)/gnats-db
LISPDIR := /usr/share/emacs/site-lisp/gnats
CONFDIR := $(DEB_CONFIGURE_SYSCONFDIR)/gnats
USER_ACCESS_FILE := $(CONFDIR)/gnatsd.user_access
HOST_ACCESS_FILE := $(CONFDIR)/gnatsd.host_access
GNATS_DATABASES := $(CONFDIR)/databases
DEB_MAKE_ENVVARS += DEFAULT_SITE=unknown-site \
GNATS_SITE=unknown-site \
GNATS_ADMIN=gnats-admin \
GNATS_ADDR=unknown-addr \
DEFAULT_ORGANIZATION=unknown-org \
SUBMITTER=unknown-org \
GNATS_USER=gnats \
CHECK_CFG=no
DEB_DH_AUTORECONF_ARGS := debian/rules -- autoreconf
DEB_CONFIGURE_SCRIPT_ENV += SENDMAIL=/usr/sbin/sendmail
# Gnats already installs libexec binaries in a "gnats" subdirectory
DEB_CONFIGURE_LIBEXECDIR = "\$${prefix}/lib"
DEB_CONFIGURE_EXTRA_FLAGS = \
--with-gnats-root='$(DBDIR)' \
--with-gnats-service=gnats \
--with-gnats-default-db=$(DBDIR) \
--with-gnatsd-user-access-file=$(USER_ACCESS_FILE) \
--with-gnatsd-host-access-file=$(HOST_ACCESS_FILE) \
--with-gnats-dblist-file=$(GNATS_DATABASES) \
--with-lispdir=$(LISPDIR)
DEB_INSTALL_DIRS_ALL = usr/bin usr/sbin usr/lib/gnats etc/gnats/defaults \
usr/share/man/man1 usr/share/man/man5 usr/share/man/man7 \
usr/share/man/man8 usr/share/lintian/overrides
DEB_INSTALL_DIRS_gnats_user = usr/share/emacs/site-lisp/gnats
DEB_INSTALL_DIRS_gnats = var/lib/gnats var/lib/gnats/gnats-db \
usr/share/doc/gnats/gnats etc/gnats/db-config etc/xinetd.d
DEB_INSTALL_EXAMPLES_gnats = -X.arch-ids -X.cvsignore
# Don't edit the {post,pre}{inst,rm} scripts
DEB_INSTALL_INFO_gnats = -n
autoreconf:
autoreconf -fi
cd doc && autoreconf -fi
cd gnats && autoreconf -fi
cd send-pr && autoreconf -fi
debscripts_tmpl := $(wildcard debian/*.in)
debscripts := $(patsubst %.in,%,$(debscripts_tmpl))
common-configure-arch:: $(debscripts)
$(debscripts):
@echo "Build debian script $@"
sed -f debian/common.sed < $@.in > $@
common-install-prehook-arch::
@echo "dh_installdirs doesn't install in the staging area"
-for d in $(DEB_INSTALL_DIRS_ALL) ; do \
mkdir -p debian/tmp/$$d ; \
done
@echo "Building HTML documentation"
-cd doc ; \
for i in gnats.texi gnats-faq.texi ; do \
$(MAKEINFO) --number-sections --html $$i ; \
done
install/gnats::
$(INSTALL) -m644 debian/user/profile debian/gnats/var/lib/gnats/.profile
$(INSTALL) -m444 debian/overrides.gnats debian/gnats/usr/share/lintian/overrides/gnats
$(INSTALL) -m 444 debian/gnats.xinetd debian/gnats/etc/xinetd.d/gnats
rmdir debian/gnats/usr/share/man/man1/ debian/gnats/usr/share/man/man7/ debian/gnats/usr/bin/ debian/gnats/usr/sbin/
binary-predeb/gnats::
rm debian/gnats/usr/share/doc/gnats/examples/tkgnats/COPYING.gz
chmod 0644 debian/gnats/usr/share/doc/gnats/examples/juniper-web-reports/index.html
dh_strip
install/gnats-user::
$(INSTALL) -m644 debian/misc/send-pr.conf debian/gnats-user/etc/gnats
$(INSTALL) -m444 debian/overrides.gnats-user \
debian/gnats-user/usr/share/lintian/overrides/gnats-user
rmdir debian/gnats-user/usr/sbin/
clean::
-rm -f $(debscripts)
-rm -rf doc/gnats doc/gnats-faq doc/*.info
|