From 252fcf67173bdbb126fcdea5bd7d1918dada0d20 Mon Sep 17 00:00:00 2001 From: Evgeniy Kozhuhovskiy Date: Sat, 9 Apr 2005 12:54:50 +0000 Subject: [PATCH] added bfha to debian distribution --- contrib/bfha/bfha.pl | 2 +- debian/bfha.def | 7 ++++ debian/changelog | 6 +++ debian/default | 10 ++++- debian/logrotate | 4 ++ debian/rules | 33 ++++++++------- debian/rules-1 | 96 -------------------------------------------- 7 files changed, 44 insertions(+), 114 deletions(-) create mode 100644 debian/bfha.def delete mode 100755 debian/rules-1 diff --git a/contrib/bfha/bfha.pl b/contrib/bfha/bfha.pl index 3b24768..4173991 100644 --- a/contrib/bfha/bfha.pl +++ b/contrib/bfha/bfha.pl @@ -43,7 +43,7 @@ my $VERSION = '$Revision$ '; my $inews = "/usr/bin/inews -h -O -S"; -my $log = "/var/spool/fido/history"; +my $log = "/var/log/fido/history"; my $rep_newsgroups = "ftn.1838.stat"; my $rep_from = "\"Statistics generator\" "; diff --git a/debian/bfha.def b/debian/bfha.def new file mode 100644 index 0000000..4345667 --- /dev/null +++ b/debian/bfha.def @@ -0,0 +1,7 @@ +my $inews = "/usr/bin/inews -h -O -S"; +my $log = "/var/log/fido/history"; +my $rep_newsgroups = "junk"; +my $rep_from = "\"Statistics generator\" "; +my $rep1_subj = "Sessions history"; +my $rep2_subj = "Sessions history"; +my $rep3_subj = "Links statistics"; diff --git a/debian/changelog b/debian/changelog index a278731..60f871a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +bforce (0.22.8.ugenk5-5) unstable; urgency=low + + * added bfha.pl script to distribution, it`s config placed in /etc/default/bforce/bfha + + -- Evgeniy Kozhuhovskiy Sat, 9 Apr 2005 15:39:26 +0200 + bforce (0.22.8.ugenk5-4) unstable; urgency=low * changed 'nocreate' to 'create 640 uucp news' in logrotate diff --git a/debian/default b/debian/default index e157130..6bd8113 100644 --- a/debian/default +++ b/debian/default @@ -1,2 +1,8 @@ -# -RUN="no" +# Bforce defaults +# (c) 2005 Evgeniy Kozhuhovskiy, e.kozhuhovskiy (at) gmail.com + +# Run bforce as daemon? +RUN=no + +# Run bforce history analyzer before logrotate (require news server) +BFHA=no diff --git a/debian/logrotate b/debian/logrotate index ab7a0e6..b8dbdf4 100644 --- a/debian/logrotate +++ b/debian/logrotate @@ -5,6 +5,10 @@ notifempty compress notifempty + prerotate + (test -f /etc/default/bforce/bfha && \ + grep "BFHA=yes" /etc/default/bforce/default) && /usr/lib/bforce/bfha.pl + endscript create 644 uucp news } diff --git a/debian/rules b/debian/rules index 8d8c229..90c90af 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,8 @@ export DH_COMPAT=3 PACKAGE = bforce - +USER = uucp +GROUP = news ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g @@ -27,7 +28,7 @@ configure-stamp: # cat $(CURDIR)/source/Makefile.in | sed 's/\(^INSTALL_.*\)-o \$${OWNER} -g \$${GROUP}/\1/' > \ # $(CURDIR)/source/Makefile.in.new # mv $(CURDIR)/source/Makefile.in.new $(CURDIR)/source/Makefile.in - cd source; ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc/bforce -with-user=uucp --with-group=news --disable-syslog --disable-log-passwd + cd source; ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc/bforce -with-user=$(USER) --with-group=$(GROUP) --disable-syslog --disable-log-passwd touch configure-stamp @@ -62,18 +63,20 @@ install: build # Add here commands to install the package into debian/bforce. # $(MAKE) -C source install DESTDIR=$(CURDIR)/debian/bforce/ # install $(CURDIR)/debian/default $(CURDIR)/debian/bforce/etc/default/bforce/ - /usr/bin/install -c -o uucp -g news source/bin/bforce $(CURDIR)/debian/bforce/usr/bin/bforce - /usr/bin/install -c -o uucp -g news source/bin/bfindex $(CURDIR)/debian/bforce/usr/bin/bfindex - /usr/bin/install -c -o uucp -g news source/bin/bfstat $(CURDIR)/debian/bforce/usr/bin/bfstat - /usr/bin/install -c -o uucp -g news source/bin/nlookup $(CURDIR)/debian/bforce/usr/bin/nlookup - /usr/bin/install -c -o uucp -g news contrib/outman $(CURDIR)/debian/bforce/usr/bin/outman - /usr/bin/install -c -m 644 -o uucp -g news examples/bforce.conf $(CURDIR)/debian/bforce/etc/bforce/bforce.conf - /usr/bin/install -c -m 644 -o uucp -g news examples/bforce.subst $(CURDIR)/debian/bforce/etc/bforce/bforce.subst - /usr/bin/install -c -m 644 -o uucp -g news examples/bforce.passwd $(CURDIR)/debian/bforce/etc/bforce/bforce.passwd - /usr/bin/install -c -m 644 -o uucp -g news examples/freq.aliases $(CURDIR)/debian/bforce/etc/bforce/freq.aliases - /usr/bin/install -c -m 644 -o uucp -g news examples/freq.dirs $(CURDIR)/debian/bforce/etc/bforce/freq.dirs + /usr/bin/install -c -o $(USER) -g $(GROUP) source/bin/bforce $(CURDIR)/debian/bforce/usr/bin/bforce + /usr/bin/install -c -o $(USER) -g $(GROUP) source/bin/bfindex $(CURDIR)/debian/bforce/usr/bin/bfindex + /usr/bin/install -c -o $(USER) -g $(GROUP) source/bin/bfstat $(CURDIR)/debian/bforce/usr/bin/bfstat + /usr/bin/install -c -o $(USER) -g $(GROUP) source/bin/nlookup $(CURDIR)/debian/bforce/usr/bin/nlookup + /usr/bin/install -c -o $(USER) -g $(GROUP) contrib/outman $(CURDIR)/debian/bforce/usr/bin/outman + /usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/bforce.conf $(CURDIR)/debian/bforce/etc/bforce/bforce.conf + /usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/bforce.subst $(CURDIR)/debian/bforce/etc/bforce/bforce.subst + /usr/bin/install -c -m 600 -o $(USER) -g $(GROUP) examples/bforce.passwd $(CURDIR)/debian/bforce/etc/bforce/bforce.passwd + /usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/freq.aliases $(CURDIR)/debian/bforce/etc/bforce/freq.aliases + /usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/freq.dirs $(CURDIR)/debian/bforce/etc/bforce/freq.dirs + /usr/bin/install $(CURDIR)/debian/bfha.def $(CURDIR)/debian/bforce/etc/default/bforce/bfha + /usr/bin/install $(CURDIR)/contrib/bfha/bfha-debian.pl $(CURDIR)/debian/bforce/usr/lib/bforce/bfha.pl # Build architecture-independent files here. binary-indep: build install @@ -97,9 +100,9 @@ binary-arch: build install dh_strip dh_compress dh_fixperms - chown -R uucp:news $(CURDIR)/debian/bforce/etc/bforce - chown -R uucp:news $(CURDIR)/debian/bforce/var/spool/fido $(CURDIR)/debian/bforce/var/spool/bforce - chown -R uucp:news $(CURDIR)/debian/bforce/var/log/bforce $(CURDIR)/debian/bforce/var/run/bforce + chown -R $(USER):news $(CURDIR)/debian/bforce/etc/bforce + chown -R $(USER):news $(CURDIR)/debian/bforce/var/spool/fido $(CURDIR)/debian/bforce/var/spool/bforce + chown -R $(USER):news $(CURDIR)/debian/bforce/var/log/bforce $(CURDIR)/debian/bforce/var/run/bforce # dh_makeshlibs dh_installdeb dh_shlibdeps diff --git a/debian/rules-1 b/debian/rules-1 deleted file mode 100755 index e8cc551..0000000 --- a/debian/rules-1 +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/make -f - -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 - -# This is the debhelper compatibility version to use. -export DH_COMPAT=3 - -PACKAGE = bforce - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -configure: #configure-stamp - -#configure-stamp: - dh_testdir - # Add here commands to configure the package. -# cat $(CURDIR)/source/Makefile.in | sed 's/\(^INSTALL_.*\)-o \$${OWNER} -g \$${GROUP}/\1/' > \ -# $(CURDIR)/source/Makefile.in.new -# mv $(CURDIR)/source/Makefile.in.new $(CURDIR)/source/Makefile.in - cd source; ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc/bforce --with-owner=uucp --with-group=news - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - $(MAKE) -C source -# /usr/bin/docbook-to-man debian/bforce.sgml > bforce.1 - - touch build-stamp - -#clean: unpatch -# dh_testdir -# dh_testroot -# rm -f build-stamp configure-stamp -# -# # Add here commands to clean up after the build process. -# -$(MAKE) -C source clean -# dh_clean -# rm -f source/config.cache source/include/config.h source/config.log\ -# source/config.status source/Makefile - -install: build - dh_testdir -# dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/bforce. - $(MAKE) -C source install DESTDIR=$(CURDIR)/debian/bforce -# install $(CURDIR)/debian/default $(CURDIR)/debian/bforce/etc/default/bforce - - -# Build architecture-independent files here. -binary-indep: configure build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: configure build install - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs -X.cvsignore - dh_installexamples examples/* -# dh_installlogrotate - dh_installinit -# dh_installcron - dh_installman $(CURDIR)/debian/bfindex.1 $(CURDIR)/debian/bforce.1 \ - $(CURDIR)/debian/bfstat.1 $(CURDIR)/debian/nlookup.1 -# dh_installinfo - dh_installchangelogs CHANGES CHANGES.kst CHANGES.ugenk - dh_link - dh_strip - dh_compress - dh_fixperms - chown -R uucp:news $(CURDIR)/debian/bforce/etc/bforce - chown -R uucp:news $(CURDIR)/debian/bforce/var/spool/fido $(CURDIR)/debian/bforce/var/spool/bforce - chown -R uucp:news $(CURDIR)/debian/bforce/var/log/bforce $(CURDIR)/debian/bforce/var/run/bforce -# dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure