File oss-proxy.spec of Package oss-proxy

# 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

Name:         oss-proxy
License:      GNU Public License
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
Proxy extensions for the for the OSS/UBS


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

# ---------------------------------------------------------------------------

[ "$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

if [ -e /etc/sysconfig/schoolserver ]
	if [ ${1:-0} -gt 1 ]; then
		sed -i "s#^redirect_program.*#redirect_program /usr/sbin/squidGuard -c /etc/squid/squidguard.conf -s#" /etc/squid/squid.conf
	        cp /etc/squid/      /etc/squid/squid.conf
        grep -q /etc/hosts || echo "" >> /etc/hosts
	%restart_on_update squid


%config /etc/logrotate.d/oss-blacklist
%config /etc/squid/
%config /etc/squid/squidguard.conf
%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/*
openSUSE Build Service is sponsored by