LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File oss-proxy.spec of Package oss-proxy (Project home:varkoly:OSS-4-0:stable)

#
# spec file for package oss-proxy (Version 4.0.0)
#
# Copyright (c) 2017 Peter Varkoly, N├╝rnberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# please send bugfixes or comments to peter@varkoly.de.
#

Name:         oss-proxy
License:      GNU Public License
Packager:     peter@varkoly.de
Vendor:       Peter Varkoly, Nuremberg, Germany
Group:        Productivity/Networking/Web/Proxy
Autoreqprov:  no
Summary:      Proxy extensions for the OSS/UBS 
Version:      4.0.0
Release:      6
Source:       oss-proxy.tar.bz2
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
BuildArchitectures: noarch
BuildRequires: -brp-check-suse
Provides:     blacklist-openschool <= 3.3.0
Obsoletes:    blacklist-openschool = %{version}
Prereq:       squid squidGuard oss-base oss-java cron
%description
Proxy extensions for the for the OSS/UBS

Authors:
--------
        peter@varkoly.de

# ---------------------------------------------------------------------------
%prep
%setup -n oss-proxy
# ---------------------------------------------------------------------------

%build
# ---------------------------------------------------------------------------

%install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
mkdir -p  $RPM_BUILD_ROOT
cp -a var $RPM_BUILD_ROOT
cp -a etc $RPM_BUILD_ROOT
cp -a usr $RPM_BUILD_ROOT

%post
if [ -e /etc/sysconfig/schoolserver ]
then
	if [ ${1:-0} -gt 1 ]; then
		/usr/share/oss/tools/update-squidguard-conf.pl
		sed -i "s#^redirect_program.*#redirect_program /usr/sbin/squidGuard -c /etc/squid/squidguard.conf -s#" /etc/squid/squid.conf
	else
	        cp /etc/squid/squid.conf.in      /etc/squid/squid.conf
		/usr/sbin/oss_init_shallalist.sh
	fi
        grep -q www.google.de /etc/hosts || echo "216.239.32.20  www.google.de www.google.com www.google.fr www.google.it www.google.hu www.google.en" >> /etc/hosts
	%restart_on_update squid
fi

%postun

%files 
%defattr(644,root,root,755)
/usr/share/oss/templates/*
%config /etc/logrotate.d/oss-blacklist
%config /etc/squid/squid.conf.in
%config /etc/squid/squidguard.conf
%defattr(755,root,root)
/etc/cron.weekly/oss-blacklist
/usr/sbin/oss_*.sh
/usr/share/oss/tools/*
%defattr(640,squid,nogroup,750)
/var/lib/squidGuard/db/shallalist.tar.gz
%dir /var/lib/squidGuard/db
%dir /var/lib/squidGuard/db/custom
%dir /var/lib/squidGuard/db/custom/good
%dir /var/lib/squidGuard/db/custom/bad
%config(noreplace) /var/lib/squidGuard/db/custom/good/*
%config(noreplace) /var/lib/squidGuard/db/custom/bad/*