]> git.pld-linux.org Git - packages/inn.git/blobdiff - inn.spec
- orphaned, outdated
[packages/inn.git] / inn.spec
index 0ff9e09432023f89bd2481a6bc24a5764a03c774..5bcaa6cf155e439a89b428eefbb66ea959ed3941 100644 (file)
--- a/inn.spec
+++ b/inn.spec
@@ -1,3 +1,5 @@
+# TODO
+# - post script is nightmare
 #
 # Conditional build:
 %bcond_with    largefiles      # enable largefiles (disables tagged hash)
@@ -11,12 +13,12 @@ Summary(pl):        INN, serwer nowinek
 Summary(pt_BR):        INN, InterNet News System (servidor news)
 Summary(tr):   INN, InterNet Haber Sistemi (haber sunucu)
 Name:          inn
-Version:       2.4.2
-Release:       1
+Version:       2.4.3
+Release:       0.1
 License:       distributable
 Group:         Networking/Daemons
 Source0:       ftp://ftp.isc.org/isc/inn/%{name}-%{version}.tar.gz
-# Source0-md5: 4942a275c70e0256dad6f1857be6d62e
+# Source0-md5: 6caa10909a7bf55fb91535685990aec9
 Source1:       %{name}-default-active
 Source2:       %{name}-default-distributions
 Source3:       %{name}-default-newsgroups
@@ -35,7 +37,10 @@ Patch5:              %{name}-setgid.patch
 Patch6:                %{name}-db4.patch
 Patch7:                %{name}-lib_install_modes.patch
 Patch8:                %{name}-config.patch
+Patch9:                %{name}-db4.4.patch
+Patch10:       %{name}-libdir.patch
 URL:           http://www.isc.org/sw/inn/
+BuildRequires: fix-%post-script-first
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: bison
@@ -44,6 +49,7 @@ BuildRequires:        flex
 BuildRequires: libtool >= 1:1.4.2-9
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        /bin/kill
 Requires(post):        /usr/bin/getent
 Requires(post):        /usr/sbin/usermod
@@ -77,20 +83,20 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 INN is a news server, which can be set up to handle USENET news, as
 well as private "newsfeeds". There is a *LOT* of information about
-setting up INN in /usr/share/doc -- read it.
+setting up INN in %{_docdir}/%{name}-%{version} -- read it.
 
 If you want innreport to generate graphs you need perl-GD package.
 
 %description -l es
 INN es un servidor de news, que puede ser configurado para manipular
 USENET news bien como newsfeeds privadas. Existe un *Montón* de
-información sobre la configuración del INN en /usr/doc -- léela.
+información sobre la configuración del INN en %{_docdir}/%{name}-%{version} -- léela.
 
 %description -l pl
 INN jest serwerem news, który mo¿na skonfigurowaæ do obs³ugi USENET-u,
 jak równie¿ do obs³ugi ,,prywatnych'' grup w sieciach intranetowych.
 Ca³e mnóstwo po¿ytecznych informacji o konfigurowaniu INN-a znajdziesz
-w katalogu /usr/share/doc/inn-*.
+w katalogu %{_docdir}/%{name}-%{version}.
 
 Je¶li chcesz ¿eby innreport generowa³ wykresy musisz zainstalowaæ
 pakiet perl-GD.
@@ -98,7 +104,7 @@ pakiet perl-GD.
 %description -l pt_BR
 INN é um servidor de news, que pode ser configurado para manipular
 USENET news bem como newsfeeds privadas. Existe um *MONTE* de
-informações sobre a configuração do INN em /usr/doc -- leia.
+informações sobre a configuração do INN em %{_docdir}/%{name}-%{version} -- leia.
 
 %package libs
 Summary:       INN libraries
@@ -251,6 +257,8 @@ sunucuya makaleyi yollar.
 %patch6
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
+%patch10 -p1
 
 touch innfeed/*.[ly]
 
@@ -301,7 +309,7 @@ install -d $RPM_BUILD_ROOT/etc/{news,rc.d/init.d,cron.d,logrotate.d} \
        $RPM_BUILD_ROOT/home/services/news
 
 %{__make} install \
-       DESTDIR="$RPM_BUILD_ROOT" \
+       DESTDIR=$RPM_BUILD_ROOT \
        PATHFILTER=%{_datadir}/news/filter \
        PATHCONTROL=%{_datadir}/news/control \
        PATHRNEWS=%{_libdir}/news/rnews \
@@ -327,20 +335,12 @@ umask 002
 touch $RPM_BUILD_ROOT/var/lib/news/history
 touch $RPM_BUILD_ROOT/var/lib/news/.news.daily
 touch $RPM_BUILD_ROOT/var/lib/news/active.times
-touch $RPM_BUILD_ROOT/var/log/news/news.notice
-touch $RPM_BUILD_ROOT/var/log/news/news.crit
-touch $RPM_BUILD_ROOT/var/log/news/news.err
-
-# obsolete?
-#touch $RPM_BUILD_ROOT%{_includedir}/inn/configdata.h
-
-mv -f $RPM_BUILD_ROOT%{_datadir}/news/*.{a,la,so*} $RPM_BUILD_ROOT%{_libdir}
 
 LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/makehistory \
        -a $RPM_BUILD_ROOT/var/lib/news/active \
        -i -r -f $RPM_BUILD_ROOT/var/lib/news/history || :
 
-#Fix perms in sample directory to avoid bogus dependencies
+# Fix perms in sample directory to avoid bogus dependencies
 find samples -name "*.in" -exec chmod a-x {} \;
 
 # remove files in conflict with cleanfeed
@@ -354,7 +354,7 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/rc.news
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ "`getent passwd http | cut -d: -f6`" = "/var/spool/news" ]; then
+if [ "`getent passwd news | cut -d: -f6`" = "/var/spool/news" ]; then
        /usr/sbin/usermod -d /home/services/news news
 fi
 umask 022
@@ -368,6 +368,8 @@ if [ -f /var/lib/news/history ]; then
        chmod 644 history.*
 else
        cd /var/lib/news
+       # FIXME: this will fail immediately as it needs *configured*
+       # inn.conf, but PLD default rpm doesn't provide one!
        %{_bindir}/makehistory
        %{_bindir}/makedbz -s `wc -l <history` -f history
        for i in dir hash index pag; do
@@ -376,72 +378,24 @@ else
        chown news:news history history.*
        chmod 644 history history.*
 fi
-[ -f /var/lib/news/active.times ] || {
+
+if [ ! -f /var/lib/news/active.times ]; then
        touch /var/lib/news/active.times
        chown news:news /var/lib/news/active.times
-}
-
-[ -f /var/log/news/news.notice ] || {
-       touch /var/log/news/news.notice
-       chown news:news /var/log/news/news.notice
-       chmod 664 /var/log/news/news.notice
-}
-
-[ -f /var/log/news/news.crit ] || {
-       touch /var/log/news/news.crit
-       chown news:news /var/log/news/news.crit
-       chmod 660 /var/log/news/news.crit
-}
-
-[ -f /var/log/news/news.err ] || {
-       touch /var/log/news/news.err
-       chown news:news /var/log/news/news.err
-       chmod 660 /var/log/news/news.err
-}
-
-[ -f /var/lib/news/.news.daily ] || {
+fi
+
+if [ ! -f /var/lib/news/.news.daily ]; then
        touch /var/lib/news/.news.daily
        chown news:news /var/lib/news/.news.daily
        chmod 664 /var/lib/news/.news.daily
-}
-
-umask 027
-if [ -f /etc/syslog.conf ]; then
-  if ! grep -q INN /etc/syslog.conf; then
-    sed -i 's/mail.none;/mail.none;news.none;/' /etc/syslog.conf
-    echo ''                                                                            >> /etc/syslog.conf
-    echo '#'                                                                           >> /etc/syslog.conf
-    echo '# INN'                                                                       >> /etc/syslog.conf
-    echo '#'                                                                           >> /etc/syslog.conf
-    echo 'news.=crit                                        /var/log/news/news.crit'   >> /etc/syslog.conf
-    echo 'news.=err                                         /var/log/news/news.err'    >> /etc/syslog.conf
-    echo 'news.notice                                       /var/log/news/news.notice' >> /etc/syslog.conf
-    fi
-  if [ -f /var/run/syslog.pid ]; then
-    kill -HUP `cat /var/run/syslog.pid` 2> /dev/null ||:
-  fi
-else
-    # syslog.conf does not exist
-    echo "mail.none /var/log/messages"                                                         > /etc/syslog.conf.inn
-    echo ""                                                                            >> /etc/syslog.conf.inn
-    echo "# INN"                                                                       >> /etc/syslog.conf.inn
-    echo "news.=crit                                      /var/log/news/news.crit"     >> /etc/syslog.conf.inn
-    echo "news.=err                                       /var/log/news/news.err"      >> /etc/syslog.conf.inn
-    echo "news.notice                                     /var/log/news/news.notice"   >> /etc/syslog.conf.inn
 fi
 
 /sbin/chkconfig --add inn
-if [ -f /var/lock/subsys/inn ]; then
-       /etc/rc.d/init.d/inn restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/inn start\" to start inn news server." >&2
-fi
+%service inn restart "inn news server"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/news ]; then
-               /etc/rc.d/init.d/inn stop
-       fi
+       %service inn stop
        /sbin/chkconfig --del inn
 fi
 
@@ -456,6 +410,7 @@ sed -e 's/^\(listenonipv6\)/#\1/;s/^bindipv6address/bindaddress6/;s/^sourceipv6a
 %files
 %defattr(644,root,root,755)
 %doc CONTRIBUTORS ChangeLog INSTALL LICENSE NEWS README TODO doc/[Icehs]*
+%attr(700,news,news) %dir /home/services/news
 
 # DB
 %attr(770,root,news) %dir /var/lib/news
@@ -469,12 +424,7 @@ sed -e 's/^\(listenonipv6\)/#\1/;s/^bindipv6address/bindaddress6/;s/^sourceipv6a
 
 # LOGS
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/inn
-%attr(770,root,news) %dir /var/log/news
-%attr(770,root,news) %dir /var/log/archiv/news
 %attr(770,news,news) %dir /var/run/news
-%attr(664,news,news) %ghost /var/log/news/news.notice
-%attr(660,news,news) %ghost /var/log/news/news.crit
-%attr(660,news,news) %ghost /var/log/news/news.err
 
 # SPOOL
 %attr(771,root,news) %dir /var/spool/news
@@ -646,6 +596,7 @@ sed -e 's/^\(listenonipv6\)/#\1/;s/^bindipv6address/bindaddress6/;s/^sourceipv6a
 %{_mandir}/man1/innmail.1*
 %{_mandir}/man1/nntpget.1*
 %{_mandir}/man1/pgpverify.1*
+%{_mandir}/man1/pullnews.1*
 %{_mandir}/man1/rnews.1*
 %{_mandir}/man1/shlock.1*
 %{_mandir}/man1/shrinkfile.1*
This page took 0.388278 seconds and 4 git commands to generate.