some adaptions in SPEC file
This commit is contained in:
parent
b0be9e3275
commit
eef75b43b8
@ -6,22 +6,22 @@
|
||||
%define sysconfdir /etc
|
||||
%define piddir /var/run/siproxd/
|
||||
%define regdir /var/lib/siproxd/
|
||||
%define siproxduser nobody
|
||||
%define siproxduser %{name}
|
||||
|
||||
Name: %{name}
|
||||
Summary: A SIP masquerading proxy with RTP support
|
||||
Version: %{ver}
|
||||
Release: %{release}
|
||||
License: GPL, (c) 2002-2008 Thomas Ries
|
||||
License: GPL, (c) 2002-2011 Thomas Ries
|
||||
Group: Applications/Communications
|
||||
Source0: %{name}-%{ver}.tar.gz
|
||||
|
||||
URL: http://siproxd.sourceforge.net/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{ver}-root
|
||||
#Docdir: %{_docdir}
|
||||
|
||||
Requires: libosip2 >= 3.0.0
|
||||
BuildRequires: libosip2 >= 3.0.0
|
||||
BuildRequires: libosip2-devel >= 3.0.0
|
||||
|
||||
Vendor: Thomas Ries
|
||||
|
||||
@ -42,35 +42,44 @@ an IP masquerading firewall or NAT router.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} \
|
||||
--sysconfdir=%{sysconfdir}
|
||||
--sysconfdir=%{sysconfdir} \
|
||||
--disable-doc
|
||||
make
|
||||
|
||||
|
||||
%install
|
||||
make prefix=$RPM_BUILD_ROOT%{prefix} \
|
||||
sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} \
|
||||
install
|
||||
mv $RPM_BUILD_ROOT%{sysconfdir}/siproxd.conf.example \
|
||||
$RPM_BUILD_ROOT%{sysconfdir}/siproxd.conf
|
||||
mv %{buildroot}%{sysconfdir}/siproxd.conf.example \
|
||||
%{buildroot}%{sysconfdir}/siproxd.conf
|
||||
|
||||
# edit siproxd.conf and put correct username
|
||||
sed -i "s/user\ =\ nobody/user\ =\ %{siproxduser}/" \
|
||||
%{buildroot}%{sysconfdir}/siproxd.conf
|
||||
|
||||
# will be added separately below
|
||||
rm -r $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
|
||||
rm -r %{buildroot}%{_defaultdocdir}/%{name}
|
||||
|
||||
install -d $RPM_BUILD_ROOT%{_initrddir}/
|
||||
install contrib/siproxd.init $RPM_BUILD_ROOT%{_initrddir}/siproxd
|
||||
install -d %{buildroot}%{_initrddir}/
|
||||
install contrib/siproxd.init %{buildroot}%{_initrddir}/siproxd
|
||||
|
||||
install -d $RPM_BUILD_ROOT%{piddir}
|
||||
install -d $RPM_BUILD_ROOT%{regdir}
|
||||
install -d %{buildroot}%{piddir}
|
||||
install -d %{buildroot}%{regdir}
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc COPYING README AUTHORS INSTALL NEWS ChangeLog doc/FAQ doc/FLI4L_HOWTO.txt
|
||||
%doc doc/html/* doc/pdf/*
|
||||
%doc COPYING README AUTHORS INSTALL NEWS ChangeLog
|
||||
%doc doc/FAQ doc/FLI4L_HOWTO.txt doc/sample_*.txt
|
||||
|
||||
%attr(0755,root,root) %{_sbindir}/siproxd
|
||||
%config %{sysconfdir}/siproxd.conf
|
||||
%config %{sysconfdir}/siproxd_passwd.cfg
|
||||
@ -81,15 +90,25 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(0700,%{siproxduser},root) %{regdir}
|
||||
|
||||
|
||||
%pre
|
||||
getent group %{siproxduser} &>/dev/null || groupadd -r %{siproxduser}
|
||||
getent passwd %{siproxduser} &>/dev/null || \
|
||||
/usr/sbin/useradd -r -g %{siproxduser} -s /sbin/nologin -c %{siproxduser} \
|
||||
-d %{regdir} %{siproxduser}
|
||||
|
||||
|
||||
%post
|
||||
echo "Edit the config file %{sysconfigdir}/siproxd.conf!"
|
||||
/sbin/chkconfig --add %{name}
|
||||
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/service %{name} stop
|
||||
/sbin/chkconfig --del %{name}
|
||||
fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Oct 09 2004 Thomas Ries <tries@gmx.net>
|
||||
- startup script in /etc/rc.d/init.d/siproxd
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user