]> git.pld-linux.org Git - packages/privoxy.git/blobdiff - privoxy.spec
- _defaultdocdir -> _docdir
[packages/privoxy.git] / privoxy.spec
index 389f4fa8acbcf9804d06aac44d48a75859ef1f4c..38eaaeee746027aa17e85541657bf812c16a721e 100644 (file)
@@ -1,36 +1,34 @@
-
-%define                oldname junkbuster
-%define                privoxyconf %{_sysconfdir}/%{name}
-
 Summary:       Privoxy - privacy enhancing proxy
 Summary(pl):   Privoxy - proxy rozszerzaj±ce prywatno¶æ
 Name:          privoxy
 Version:       3.0.3
-Release:       1
-License:       GPL
+Release:       5
+License:       GPL v2+
 Source0:       http://dl.sourceforge.net/ijbswa/%{name}-%{version}-2-stable.src.tar.gz
 # Source0-md5: d7f6c2fcb926e6110659de6e866b21e4
+Source1:       %{name}.init
+Source2:       %{name}.logrotate
+Patch0:                %{name}-DESTDIR.patch
 Group:         Networking/Daemons
 URL:           http://www.privoxy.org/
 BuildRequires: autoconf
+BuildRequires: automake
 BuildRequires: libtool
 BuildRequires: lynx
+BuildRequires: pcre-devel
 BuildRequires: perl-base
-BuildRequires: rpmbuild(macros) >= 1.231
-PreReq:                rc-scripts
-Requires(pre): /bin/id
-Requires(pre): /usr/bin/getgid
-Requires(pre): /usr/sbin/groupadd
-Requires(pre): /usr/sbin/useradd
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires:      rc-scripts
 Provides:      group(privoxy)
 Provides:      user(privoxy)
-Obsoletes:     junkbuster
-Obsoletes:     junkbuster-blank
-Obsoletes:     junkbuster-raw
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -55,86 +53,41 @@ samodzielnych i serwer
 Privoxy jest oparte na Internet Junkbusterze.
 
 %prep
-%setup -qcT
-tar xf %{SOURCE0} --strip-components=1
+%setup -q -n %{name}-%{version}-stable
+%patch0 -p0
 
 %build
-%{__autoheader}
+%{__aclocal}
 %{__autoconf}
-%configure \
-       --disable-dynamic-pcre
+%{__autoheader}
+cp -f /usr/share/automake/config.sub .
+%configure
 
-%{__make}
+%{__make} \
+       CFLAGS="%{rpmcflags}"
+# XXX: above supresses -pthread; should it be added?
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{_sbindir} \
-       $RPM_BUILD_ROOT%{_mandir}/man1 \
-       $RPM_BUILD_ROOT/var/log/%{name} \
-       $RPM_BUILD_ROOT%{privoxyconf}/templates \
-       $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d}
-
-install -m 744 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
-
-# Using sed to "convert" from DOS format to UNIX
-# This is important behaviour, and should not be removed without some
-# other assurance that these files don't get packed in the the
-# wrong format
-for i in `ls *.action`
-do
-       cat $i | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/$i
-done
-cat default.filter | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/default.filter
-cat trust | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/trust
-(
-cd templates
-for i in `ls`
-do
-       cat $i | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/templates/$i
-done
-)
-
-cp -f %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
-cp -f %{name}.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
-install %{name}.init $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install -d $RPM_BUILD_ROOT/var/log/%{name}
-
-# verify all file locations, etc. in the config file
-# don't start with ^ or commented lines are not replaced
-## Changing the sed paramter delimiter to @, so we don't have to
-## escape the slashes
-cat config | \
-       sed 's@^confdir.*@confdir %{privoxyconf}@g' | \
-# sed 's/^permissionsfile.*/permissionsfile \/etc\/%{name}\/permissionsfile/g' | \
-# sed 's/^filterfile.*/default.filter \/etc\/%{name}\/default.filter/g' | \
-# sed 's/^logfile.*/logfile \/var\/log\/%{name}\/logfile/g' | \
-# sed 's/^jarfile.*/jarfile \/var\/log\/%{name}\/jarfile/g' | \
-# sed 's/^forward.*/forward \/etc\/%{name}\/forward/g' | \
-# sed 's/^aclfile.*/aclfile \/etc\/%{name}\/aclfile/g' > \
-       sed 's@^logdir.*@logdir %{_localstatedir}/log/%{name}@g' | \
-               sed -e 's/[[:cntrl:]]*$//' > \
-               $RPM_BUILD_ROOT%{privoxyconf}/config
-       perl -pe 's/{-no-cookies}/{-no-cookies}\n\.redhat.com/' default.action >\
-               $RPM_BUILD_ROOT%{privoxyconf}/default.action
+%{__make} install \
+       CONF_BASE=%{_sysconfdir}/privoxy \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+
+# just GPLv2
+rm -f $RPM_BUILD_ROOT%{_docdir}/privoxy/LICENSE
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %pre
 %groupadd -g 108 privoxy
-%useradd -u 108 -d %{privoxyconf} -s /bin/false -c "%{name} user" -g privoxy privoxy
+%useradd -u 108 -d %{_sysconfdir}/%{name} -s /bin/false -c "%{name} user" -g privoxy privoxy
 
 %post
-# for upgrade from 2.0.x
-[ -f /var/log/%{oldname}/logfile ] && {
-       mv -f /var/log/%{oldname}/logfile /var/log/%{name}/logfile ||: ;
-       chown -R %{name}:%{name} /var/log/%{name} 2>/dev/null ||: ;
-}
-[ -f /var/log/%{name}/%{name} ] && {
-       mv -f /var/log/%{name}/%{name} /var/log/%{name}/logfile ||: ;
-       chown -R %{name}:%{name} %{privoxyconf} 2>/dev/null ||: ;
-}
 /sbin/chkconfig --add privoxy
 %service privoxy restart
 
@@ -152,69 +105,19 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README
-%doc doc/text/developer-manual.txt doc/text/user-manual.txt doc/text/faq.txt
-%doc doc/webserver/developer-manual
-%doc doc/webserver/user-manual
-%doc doc/webserver/faq
-%doc doc/webserver/*.css doc/webserver/privoxy-index.html
-%doc doc/webserver/images
-%doc doc/webserver/man-page
-
-%config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
-%attr(754,root,root) /etc/rc.d/init.d/%{name}
 %attr(755,root,root) %{_sbindir}/%{name}
 %{_mandir}/man1/%{name}.*
+%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+
+%dir %attr(751,privoxy,privoxy) /var/log/%{name}
+%ghost %attr(640,privoxy,privoxy) %verify(not md5 mtime size) /var/log/%{name}/*
+
+%dir %attr(751,root,privoxy) %{_sysconfdir}/%{name}
+%dir %attr(751,root,privoxy) %{_sysconfdir}/%{name}/templates
+%attr(640,root,privoxy) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/config
+%attr(640,root,privoxy) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/trust
+%attr(640,root,privoxy) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
+%attr(640,root,privoxy) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/templates/*
 
-# ATTENTION FOR defattr change here !
-%defattr(644,%{name},%{name},755)
-%dir %{privoxyconf}
-%dir %{privoxyconf}/templates
-%dir /var/log/%{name}
-
-# WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
-# We should not use wildchars here. This could mask missing files problems
-# -- morcego
-# WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
-%config(noreplace) %verify(not size mtime md5) %{privoxyconf}/config
-%config %{privoxyconf}/standard.action
-%config(noreplace) %verify(not size mtime md5) %{privoxyconf}/user.action
-%config %{privoxyconf}/default.action
-%config %{privoxyconf}/default.filter
-%config %{privoxyconf}/trust
-
-# Please keep these alphabetized so its easier to find one that
-# is not included.
-%config %{privoxyconf}/templates/blocked
-%config %{privoxyconf}/templates/cgi-error-404
-%config %{privoxyconf}/templates/cgi-error-bad-param
-%config %{privoxyconf}/templates/cgi-error-disabled
-%config %{privoxyconf}/templates/cgi-error-file
-%config %{privoxyconf}/templates/cgi-error-file-read-only
-%config %{privoxyconf}/templates/cgi-error-modified
-%config %{privoxyconf}/templates/cgi-error-parse
-%config %{privoxyconf}/templates/cgi-style.css
-%config %{privoxyconf}/templates/connect-failed
-%config %{privoxyconf}/templates/default
-%config %{privoxyconf}/templates/edit-actions-add-url-form
-%config %{privoxyconf}/templates/edit-actions-for-url
-%config %{privoxyconf}/templates/edit-actions-for-url-filter
-%config %{privoxyconf}/templates/edit-actions-list
-%config %{privoxyconf}/templates/edit-actions-list-button
-%config %{privoxyconf}/templates/edit-actions-list-section
-%config %{privoxyconf}/templates/edit-actions-list-url
-%config %{privoxyconf}/templates/edit-actions-remove-url-form
-%config %{privoxyconf}/templates/edit-actions-url-form
-%config %{privoxyconf}/templates/mod-local-help
-%config %{privoxyconf}/templates/mod-support-and-service
-%config %{privoxyconf}/templates/mod-title
-%config %{privoxyconf}/templates/mod-unstable-warning
-%config %{privoxyconf}/templates/no-such-domain
-%config %{privoxyconf}/templates/show-request
-%config %{privoxyconf}/templates/show-status
-%config %{privoxyconf}/templates/show-status-file
-%config %{privoxyconf}/templates/show-url-info
-%config %{privoxyconf}/templates/show-version
-%config %{privoxyconf}/templates/toggle
-%config %{privoxyconf}/templates/toggle-mini
-%config %{privoxyconf}/templates/untrusted
+%doc $RPM_BUILD_ROOT%{_docdir}/%{name}/*
This page took 0.047194 seconds and 4 git commands to generate.