|
|
@@ -23,10 +23,6 @@
|
|
|
## SUCH DAMAGE.
|
|
|
##
|
|
|
|
|
|
-# package versions
|
|
|
-%define V_inn 2.4.0
|
|
|
-%define V_cleanfeed 20010805
|
|
|
-
|
|
|
# package information
|
|
|
Name: inn
|
|
|
Summary: InterNetNews Usenet Server
|
|
|
@@ -36,21 +32,20 @@ Packager: The OpenPKG Project
|
|
|
Distribution: OpenPKG [BASE]
|
|
|
Group: News
|
|
|
License: ISC
|
|
|
-Version: %{V_inn}
|
|
|
-Release: 20030511
|
|
|
+Version: 2.4.0
|
|
|
+Release: 20030527
|
|
|
|
|
|
# list of sources
|
|
|
-Source0: ftp://ftp.isc.org/isc/inn/inn-%{V_inn}.tar.gz
|
|
|
-Source1: http://www.bofh.it/~md/cleanfeed/cleanfeed-%{V_cleanfeed}.tgz
|
|
|
-Source2: rc.inn
|
|
|
-Source3: fsl.inn
|
|
|
+Source0: ftp://ftp.isc.org/isc/inn/inn-%{version}.tar.gz
|
|
|
+Source1: rc.inn
|
|
|
+Source2: fsl.inn
|
|
|
Patch0: inn.patch
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20020206, fsl, gzip, make, perl, db, openssl, bison, flex
|
|
|
-PreReq: OpenPKG, openpkg >= 20020206, fsl, gzip, perl, perl-crypto, MTA
|
|
|
+PreReq: OpenPKG, openpkg >= 20020206, fsl, gzip, perl, MTA
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -60,15 +55,10 @@ AutoReqProv: no
|
|
|
that feed you news from those that have users reading news.
|
|
|
|
|
|
%prep
|
|
|
- %setup0 -q -c
|
|
|
- %setup1 -q -T -D -a 1
|
|
|
- cd inn-%{V_inn}
|
|
|
- %patch0 -p0
|
|
|
+ %setup -q
|
|
|
+ %patch -p0
|
|
|
|
|
|
%build
|
|
|
- # build inn
|
|
|
- cd inn-%{V_inn}
|
|
|
-
|
|
|
# adjust some too strange INN paths
|
|
|
%{l_shtool} subst \
|
|
|
-e "s;^\\(PATHBIN.*=\\).*;\\1 \$(PATHNEWS)/libexec/inn;" \
|
|
|
@@ -112,109 +102,87 @@ AutoReqProv: no
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
- # install INN
|
|
|
- ( cd inn-%{V_inn}
|
|
|
-
|
|
|
- # determine current user and group
|
|
|
- thisuser=`%{l_shtool} echo -e '%u'`
|
|
|
- thisgroup=`%{l_shtool} echo -e '%g'`
|
|
|
- if [ ".$thisgroup" = . ]; then
|
|
|
- thisgroup="$thisuser"
|
|
|
- fi
|
|
|
-
|
|
|
- # adjust INN installation procedure
|
|
|
- %{l_shtool} subst \
|
|
|
- -e "s;^\\(prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};" \
|
|
|
- -e "s;^\\(PATH.*=[ ]*\\)\\(%{l_prefix}\\);\\1 $RPM_BUILD_ROOT\\2;" \
|
|
|
- -e "s;^\\(NEWSUSER.*=\\).*;\\1 $thisuser;" \
|
|
|
- -e "s;^\\(NEWSGROUP.*=\\).*;\\1 $thisgroup;" \
|
|
|
- -e "s;^\\(OWNER.*=\\).*;\\1;" \
|
|
|
- -e "s;^\\(ROWNER.*=\\).*;\\1;" \
|
|
|
- Makefile.global
|
|
|
-
|
|
|
- # perform installation procedure
|
|
|
- %{l_make} %{l_mflags} install
|
|
|
-
|
|
|
- # make some programs manually accessible
|
|
|
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
- for bin in controlbatch controlchan news2mail startinnfeed overchan \
|
|
|
- archive innmail innconfval ctlinnd inews rnews nntpsend; do
|
|
|
- ln $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/$bin \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
|
|
|
- done
|
|
|
-
|
|
|
- # strip installation
|
|
|
- rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/filter/*.py
|
|
|
- rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/inn/*.tcl
|
|
|
- rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/inn/lib*.a
|
|
|
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
-
|
|
|
- # adjust configuration
|
|
|
- ( echo ''
|
|
|
- echo '# dummy entry to make INN happy as long as'
|
|
|
- echo '# this server has no real newsfeeds configured.'
|
|
|
- echo 'dummy-feed:!*::'
|
|
|
- echo ''
|
|
|
- ) >>$RPM_BUILD_ROOT%{l_prefix}/etc/inn/newsfeeds
|
|
|
- ( echo ''
|
|
|
- echo '# use the traditional spool area for storage'
|
|
|
- echo 'method tradspool {'
|
|
|
- echo ' newsgroups: *'
|
|
|
- echo ' class: 1'
|
|
|
- echo '}'
|
|
|
- ) >>$RPM_BUILD_ROOT%{l_prefix}/etc/inn/storage.conf
|
|
|
-
|
|
|
- # create initial history database
|
|
|
- ( cd $RPM_BUILD_ROOT%{l_prefix}/var/inn/db
|
|
|
- touch history
|
|
|
- INNCONF=$RPM_BUILD_ROOT%{l_prefix}/etc/inn/inn.conf \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/makedbz -i -f ./history
|
|
|
- chmod 644 history*
|
|
|
- )
|
|
|
-
|
|
|
- # adjust permissions
|
|
|
- chmod 664 $RPM_BUILD_ROOT%{l_prefix}/var/inn/db/active
|
|
|
-
|
|
|
- # create empty logfiles
|
|
|
- touch $RPM_BUILD_ROOT%{l_prefix}/var/inn/log/news.log
|
|
|
-
|
|
|
- # install run-command script
|
|
|
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
- %{l_shtool} install -c -m 755 \
|
|
|
- -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- -e 's;@l_musr@;%{l_musr};g' \
|
|
|
- -e 's;@l_mgrp@;%{l_mgrp};g' \
|
|
|
- %{SOURCE rc.inn} \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
-
|
|
|
- # OSSP fsl support
|
|
|
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
- -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- %{SOURCE fsl.inn} \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
|
- )
|
|
|
+ # determine current user and group
|
|
|
+ thisuser=`%{l_shtool} echo -e '%u'`
|
|
|
+ thisgroup=`%{l_shtool} echo -e '%g'`
|
|
|
+ if [ ".$thisgroup" = . ]; then
|
|
|
+ thisgroup="$thisuser"
|
|
|
+ fi
|
|
|
|
|
|
- # install cleanfeed
|
|
|
- ( cd cleanfeed-%{V_cleanfeed}
|
|
|
- %{l_shtool} subst \
|
|
|
- -e 's;^\($config_dir.*=\).*;\1 "%{l_prefix}/etc/inn"\;;' \
|
|
|
- cleanfeed
|
|
|
- ( echo "#!%{l_prefix}/bin/perl"
|
|
|
- cat cleanfeed
|
|
|
- ) >filter_innd.pl
|
|
|
-
|
|
|
- # FIXME: provide a suitable default config
|
|
|
- cp cleanfeed.local.sample cleanfeed.local
|
|
|
-
|
|
|
- %{l_shtool} install -c -m 755 \
|
|
|
- filter_innd.pl \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/filter/
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
- cleanfeed.local \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/inn/
|
|
|
+ # adjust INN installation procedure
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e "s;^\\(prefix.*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};" \
|
|
|
+ -e "s;^\\(PATH.*=[ ]*\\)\\(%{l_prefix}\\);\\1 $RPM_BUILD_ROOT\\2;" \
|
|
|
+ -e "s;^\\(NEWSUSER.*=\\).*;\\1 $thisuser;" \
|
|
|
+ -e "s;^\\(NEWSGROUP.*=\\).*;\\1 $thisgroup;" \
|
|
|
+ -e "s;^\\(OWNER.*=\\).*;\\1;" \
|
|
|
+ -e "s;^\\(ROWNER.*=\\).*;\\1;" \
|
|
|
+ Makefile.global
|
|
|
+
|
|
|
+ # perform installation procedure
|
|
|
+ %{l_make} %{l_mflags} install
|
|
|
+
|
|
|
+ # make some programs manually accessible
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
+ for bin in controlbatch controlchan news2mail startinnfeed overchan \
|
|
|
+ archive innmail innconfval ctlinnd inews rnews nntpsend; do
|
|
|
+ ln $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/$bin \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
|
|
|
+ done
|
|
|
+
|
|
|
+ # strip installation
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/filter/*.py
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/inn/*.tcl
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/inn/lib*.a
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/doc
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
|
|
|
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
+
|
|
|
+ # adjust configuration
|
|
|
+ ( echo ''
|
|
|
+ echo '# dummy entry to make INN happy as long as'
|
|
|
+ echo '# this server has no real newsfeeds configured.'
|
|
|
+ echo 'dummy-feed:!*::'
|
|
|
+ echo ''
|
|
|
+ ) >>$RPM_BUILD_ROOT%{l_prefix}/etc/inn/newsfeeds
|
|
|
+ ( echo ''
|
|
|
+ echo '# use the traditional spool area for storage'
|
|
|
+ echo 'method tradspool {'
|
|
|
+ echo ' newsgroups: *'
|
|
|
+ echo ' class: 1'
|
|
|
+ echo '}'
|
|
|
+ ) >>$RPM_BUILD_ROOT%{l_prefix}/etc/inn/storage.conf
|
|
|
+
|
|
|
+ # create initial history database
|
|
|
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/var/inn/db
|
|
|
+ touch history
|
|
|
+ INNCONF=$RPM_BUILD_ROOT%{l_prefix}/etc/inn/inn.conf \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/makedbz -i -f ./history
|
|
|
+ chmod 644 history*
|
|
|
)
|
|
|
|
|
|
+ # adjust permissions
|
|
|
+ chmod 664 $RPM_BUILD_ROOT%{l_prefix}/var/inn/db/active
|
|
|
+
|
|
|
+ # create empty logfiles
|
|
|
+ touch $RPM_BUILD_ROOT%{l_prefix}/var/inn/log/news.log
|
|
|
+
|
|
|
+ # install run-command script
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ -e 's;@l_musr@;%{l_musr};g' \
|
|
|
+ -e 's;@l_mgrp@;%{l_mgrp};g' \
|
|
|
+ %{SOURCE rc.inn} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+
|
|
|
+ # OSSP fsl support
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ %{SOURCE fsl.inn} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
|
+
|
|
|
# strip binaries
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/libexec/inn/* 2>/dev/null || true
|