/[smecontribs]/rpms/dansguardian/contribs8/dansguardian.spec
ViewVC logotype

Diff of /rpms/dansguardian/contribs8/dansguardian.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by unnilennium, Tue Jul 2 19:04:58 2013 UTC Revision 1.3 by slords, Mon Jul 15 14:09:58 2013 UTC
# Line 1  Line 1 
1  # $Id: dansguardian.spec,v 1.1 2013/06/28 12:15:33 unnilennium Exp $  # $Id: dansguardian.spec,v 1.1.2.1 2013/07/15 13:55:40 slords Exp $
2  # Authority: dungog  # Authority: dag
3  # Name: Stephen Noble  # Upstream: Daniel Barron <author$dansguardian,org>
4    
5    %define real_name DansGuardian
6    
7    Summary: Content filtering web proxy
8  Name: dansguardian  Name: dansguardian
9  Version: 2.10.1.1  Version: 2.10.1.1
10  Release: 1%{?dist}  Release: 1%{?dist}
11  Summary: Content filter  License: GPLv2+
12  License: GNU GPL version 2  Group: System Environment/Daemons
13  Url: http://www.dansguardian.org  URL: http://www.dansguardian.org/
14  Group: System/Servers  
15  Source0: %name-%version.tar.gz  Source0: http://dansguardian.org/downloads/2/Stable/%{name}-%{version}.tar.gz
16  Patch0: dansguardian-gcc44.patch  Source1: dansguardian.init
17  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  Source2: dansguardian.httpd
18  BuildRequires: gcc-c++ zlib-devel clamav-devel bzip2-devel gmp-devel pkgconfig  Source3: dansguardian.logrotate
19  Requires: squid clamav  
20  #clamav-lib  # Fixes some compilation errors with gcc 4.4
21    Patch1: dansguardian-gcc44.patch
22    
23    BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
24    
25    BuildRequires: gcc-c++
26    BuildRequires: pcre-devel
27    BuildRequires: zlib-devel
28    BuildRequires: pkgconfig
29    BuildRequires: which
30    BuildRequires: clamav-devel
31    
32    Requires(pre):   shadow-utils
33    Requires(post):  chkconfig
34    Requires(preun): chkconfig
35    Requires(preun): initscripts
36    
37  %description  %description
38  DansGuardian is a web content filtering proxy that uses Squid to do all  DansGuardian is a web filtering engine that checks the content within
39  the fetching. It filters using multiple methods. These methods include  the page itself in addition to the more traditional URL filtering.
40  URL and domain filtering, content phrase filtering, PICS filtering,  
41  MIME filtering, file extension filtering, POST limiting.  DansGuardian is a content filtering proxy. It filters using multiple methods,
42    including URL and domain filtering, content phrase filtering, PICS filtering,
43    MIME filtering, file extension filtering, POST filtering.
44    
45  %prep  %prep
46  %setup -q  %setup
47  %patch0 -p1  %patch1 -p1
48    
49  %build  %build
50  %configure --datadir=/etc \  
51  --enable-clamd \  %configure \
52  --enable-icap \     --disable-clamav \
53  --enable-ntlm \     --enable-clamd \
54  --enable-trickledm \     --enable-icap \
55  --enable-fancydm \     --disable-kavd \
56  --enable-email \     --enable-commandline \
57  --enable-pcre=no \     --enable-trickledm \
58  --with-logdir=/var/log/dansguardian \     --enable-ntlm \
59  --with-proxyuser=clamav \     --enable-email \
60  --with-proxygroup=clamav \     --with-proxyuser=dansguardian \
61  --with-piddir=/var/run     --with-proxygroup=dansguardian
62  make  
63    %{__make} %{?_smp_mflags}
64    
65  %install  %install
66  rm -rf $RPM_BUILD_ROOT  %{__rm} -rf %{buildroot}
67    
68    %{__make} install DESTDIR=%{buildroot}
69    
70    install -Dpm 644 %{SOURCE3} \
71        $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
72    
73    # delete the other scripts since they are of no use for Fedora users
74    rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/scripts
75    chmod 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}.pl
76    
77    # install init script and httpd config
78    install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name}
79    install -Dp -m0644 %{SOURCE2} \
80        $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
81    
82  make DESTDIR=$RPM_BUILD_ROOT install  # we'll install this later within %doc
83  mkdir -p $RPM_BUILD_ROOT/etc/init.d/  rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
84  mkdir -p $RPM_BUILD_ROOT/usr/share/dansguardian  
85  touch $RPM_BUILD_ROOT/etc/dansguardian/lists/exceptionfileurllist  # create the log dir
86  cp $RPM_BUILD_ROOT/etc/dansguardian/scripts/systemv-init $RPM_BUILD_ROOT/etc/init.d/dansguardian  install -dm 755 $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
 rm -rf $RPM_BUILD_ROOT/usr/share/doc/dansguardian  
87    
88  %clean  %clean
89  rm -rf $RPM_BUILD_ROOT  %{__rm} -rf %{buildroot}
90    
91  %pre  %pre
92    getent group %{name} >/dev/null || groupadd -r %{name}
93    getent passwd %{name} >/dev/null || \
94    useradd -r -g %{name} -d %{_datadir}/%{name} -s /sbin/nologin \
95       -c "DansGuardian web content filter" %{name}
96    exit 0
97    
98  %post  %post
99    if [ $1 -eq 1 ]; then
100        /sbin/chkconfig --add %{name}
101    fi
102    
103  %preun  %preun
104  if [ $1 = 0 ]; then  if [ $1 -eq 0 ]; then
105   /sbin/service %{name} stop 2>/dev/null 1>/dev/null      /sbin/service %{name} stop >/dev/null 2>&1
106        /sbin/chkconfig --del %{name}
107    fi
108    
109    %postun
110    if [ $1 -ge 1 ] ; then
111        /sbin/service %{name} condrestart >/dev/null 2>&1 || :
112  fi  fi
113    
114  %files  %files
115  %defattr(-,root,root)  %defattr(-, root, root, 0755)
116  %doc README NEWS ChangeLog AUTHORS COPYING  %doc COPYING INSTALL README UPGRADING
117  %doc doc/AuthPlugins doc/ContentScanners doc/DownloadManagers doc/FAQ doc/FAQ.html doc/Plugins  %doc doc/AuthPlugins doc/ContentScanners doc/DownloadManagers doc/FAQ
118  %attr(0755,root,root) %dir /etc/dansguardian  %doc doc/FAQ.html doc/Plugins
119  %attr(0644,root,root) %config(noreplace) /etc/dansguardian/*  %doc %{_mandir}/man8/%{name}.8.gz
120  %attr(0755,root,root) /etc/init.d/dansguardian  %{_sbindir}/%{name}
121  %attr(0755,clamav,nobody) %dir /var/log/dansguardian  %attr(-,%{name},%{name}) %{_datadir}/%{name}
122  %attr(0755,root,root) %{_sbindir}/*  %{_initrddir}/%{name}
123  %attr(0644,root,root) %{_mandir}/*/*  %dir %{_sysconfdir}/%{name}
124  %{_datadir}/%{name}/  %config(noreplace) %{_sysconfdir}/%{name}/%{name}*.conf
125    %dir %{_sysconfdir}/%{name}/authplugins
126    %config(noreplace) %{_sysconfdir}/%{name}/authplugins/*
127    %dir %{_sysconfdir}/%{name}/contentscanners
128    %config(noreplace) %{_sysconfdir}/%{name}/contentscanners/*
129    %dir %{_sysconfdir}/%{name}/downloadmanagers
130    %config(noreplace) %{_sysconfdir}/%{name}/downloadmanagers/*
131    %dir %{_sysconfdir}/%{name}/lists
132    %config(noreplace) %{_sysconfdir}/%{name}/lists/*
133    %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
134    %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
135    
136    %defattr(644, %{name}, %{name}, 755)
137    %dir %{_localstatedir}/log/%{name}
138    
139  %changelog  %changelog
140  * Tue Jul 2 2013 JP Pialasse <tests@pialasse.com> 2.10.1.1-1.sme  * Tue Jul 15 2013 JP Pialasse <tests@pialasse.com> 2.10.1.1-1.sme
 - Upstream Release 2.10.1.1  
141  - Update to build against clamav/clamd 0.97  - Update to build against clamav/clamd 0.97
142    
143  * Sat Apr 4 2009 Stephen Noble <support@dungog.net> 2.10.0.3-4.sme  * Thu Jul 14 2011 Yury V. Zaytsev <yury@shurup.com> - 2.10.1.1-1
144  - build without "--enable-clamav" we use clamd  - Synced the SPEC with Fedora Rawhide where appropriate.
145    - Updated to release 2.10.1.1.
 * Sat Apr 4 2009 Stephen Noble <support@dungog.net> 2.10.0.3-3.sme  
 - Upstream Release 2.10.0.3      
 - Update to build against clamav 0.95    
   
 * Fri Dec 12 2008 Stephen Noble <support@dungog.net> 2.10.0.2-1.sme  
 - Conflicts dungog-dansguardian < 2.9  
 - Upstream Release 2.10.0.2        
146    
147  * Thu Oct 9 2008 Shad L. Lords <slords@mail.com> 2.10-1.sme  * Sat Apr 08 2006 Dries Verachtert <dries@ulyssis.org> - 2.8.0.6-1.2
148  - Upstream Release 2.10  - Rebuild for Fedora Core 5.
149    
150  * Fri Sep 5 2008 Shad L. Lords <slords@mail.com> 2.9.9.7-1  * Mon Aug 15 2005 Dries Verachtert <dries@ulyssis.org> - 2.8.0.6-1
151  - Upstream Release 2.9.9.7  - Updated to release 2.8.0.6.
 - Update to build against clamav 0.94  
152    
153  * Sat May 6 2008 Shad L. Lords <slords@mail.com> 2.9.9.4-1  * Thu Mar 31 2005 Dag Wieers <dag@wieers.com> - 2.8.0.4-1
154  - Upstream Release 2.9.9.4  - Updated to release 2.8.0.4.
155    
156  * Sat Apr 19 2008 Shad L. Lords <slords@mail.com> 2.9.9.3-1  * Fri Jul 30 2004 Dag Wieers <dag@wieers.com> - 2.8.0.2-1
157  - Upstream Release 2.9.9.3  - Updated to release 2.8.0.2.
 - Update to build against clamav 0.93  
158    
159  * Sat Dec 22 2007 Stephen Noble dungog.net  * Wed Jul 21 2004 Dag Wieers <dag@wieers.com> - 2.8.0-1
160  - Upstream Release 2.9.9.2  - Updated to release 2.8.0-0.
161    
162  * Sun Oct 28 2007 Stephen Noble dungog.net  * Thu Apr 15 2004 Dag Wieers <dag@wieers.com> - 2.6.1.13-1
163  - rebuild for SME Server 2.9.9.1  - Updated to release 2.6.1-13.
164    
165  * Tue Jun 19 2007 Daniel Bartz  * Fri Mar 26 2004 Dag Wieers <dag@wieers.com> - 2.6.1.12-1
166  - rebuild for the centos repo  - Initial package. (using DAR)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed