File srvx.spec of Package srvx

# norootforbuild

Name: srvx
Version: 1.3.1
Release: 0
%define pkg_name srvx
#
License: BSD
Group: Productivity/Networking/IRC
#
BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-build
BuildRequires: openssl-devel pkgconfig
%define srvx_home /var/lib/%{name}
%define srvx_log  /var/log/%{name}
%define srvx_run  /var/run/%{name}
#
Url: http://www.srvx.net/
Source:  %{name}-%{version}.tar.bz2
#Source1: srvx.init
Source2: srvx.README.SuSE
Patch:  srvx-1.3.1_default_paths.patch
#
Summary: A set of IRC services for ircu P10 protocol networks
%description
srvx is a set of IRC services for ircu P10 protocol networks; it is developed
by a team of programmers affiliated with the GameSurge IRC Network. srvx is
designed to be a fast, extensible, scalable and reliable provider of NickServ,
ChanServ, HelpServ, OperServ, and Global services as well as advanced proxy
detection.

  WARNING THIS PACKAGE IS NOT MEANT FOR PRODUCTION USE YET.
  I JUST UPLOADED IT FOR TESTING PURPOSE.

  YOU HAVE BEEN WARNED

Authors:
---------
    def        <def@vt.edu>
    Entrope    <entrope@users.sourceforge.net>
    Jedi       <jedi@turboflux.net>
    SailorFrag <sailorfrag@users.sourceforge.net>
    Zoot       <zoot@gamesurge.net>
    Phooeybane <phooeybane@glined.org>
    Portal     <portal@vt.edu>
    Seldon

%debug_package
%prep
%setup
%patch
%{__cp} -v %{S:2} README.SuSE

%build
autoreconf -fi
%if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030
export CFLAGS="%{optflags} -fstack-protector"
%endif
%configure \
    --sysconfdir=%{_sysconfdir}/%{pkg_name} \
    --bindir=%{_sbindir}
%{__make}

%install
%makeinstall prefix=%{buildroot}%{_prefix}/lib/%{name}/
# DOCDIR=%{_docdir}/%{name}
%{__install} -d -m 0755 %{buildroot}{%{srvx_home},%{srvx_run},%{srvx_log}}
for conf in %{buildroot}%{_sysconfdir}/%{name}/*.conf.example ; do
  %{__mv} -v ${conf} ${conf//.example}
done

%clean
%{__rm} -rf %{buildroot}

%pre
/usr/sbin/groupadd -r %{pkg_name} &>/dev/null ||:
/usr/sbin/useradd -r -o -g %{pkg_name} -s /bin/false -c "%{pkg_name} daemon" -d %{srvx_home} %{pkg_name} &>/dev/null || :

%if 0
%preun
%stop_on_removal %{pkg_name}

%post
%fillup_and_insserv %{pkg_name}

%postun
%restart_on_update %{pkg_name}
%insserv_cleanup
%endif

%files
%defattr(-,root,root,-)
#%doc %{_docdir}/%{name}
%dir %attr(750,srvx,srvx) %{srvx_home}
%dir %attr(750,srvx,srvx) %{srvx_run}
%dir %attr(750,srvx,srvx) %{srvx_log}
%dir %attr(750,root,srvx) /etc/srvx/
%config(noreplace) %attr(640,root,srvx) /etc/srvx/*.conf
%attr(750,root,srvx) /usr/sbin/srvx
%dir /usr/share/srvx/
/usr/share/srvx/help/
%doc AUTHORS ChangeLog COPYING FAQ INSTALL NEWS README* TODO UPGRADE *.conf.example

%changelog
openSUSE Build Service is sponsored by