Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / siproxd / siproxd.spec
1 %define name            siproxd
2 %define ver             0.5.10
3 %define release         1
4 %define serial          1
5 %define prefix          %{_prefix}
6 %define sysconfdir      /etc
7 %define piddir          /var/run/siproxd/
8 %define regdir          /var/lib/siproxd/
9 %define siproxduser     nobody
10
11 Name:           %{name}
12 Summary:        A SIP masquerading proxy with RTP support
13 Version:        %{ver}
14 Release:        %{release}
15 License:        GPL, (c) 2002-2005 Thomas Ries
16 Group:          Applications/Communications
17 Source0:        %{name}-%{ver}.tar.gz
18
19 URL:            http://siproxd.sourceforge.net/
20 BuildRoot:      %{_tmppath}/%{name}-%{ver}-root
21 Docdir:         %{_docdir}
22
23 Requires:       libosip2 >= 2.0.2
24 BuildRequires:  libosip2 >= 2.0.2
25
26 Vendor:         Thomas Ries
27
28 Packager:       Thomas Ries <tries@gmx.net>
29
30 %description
31 Siproxd is an proxy/masquerading daemon for the SIP protocol.
32 It handles registrations of SIP clients on a private IP network
33 and performs rewriting of the SIP message bodies to make SIP
34 connections possible via an masquerading firewall.
35 It allows SIP clients (like kphone, linphone) to work behind
36 an IP masquerading firewall or router.
37
38
39 %prep
40 %setup -q
41
42 %build
43 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} \
44                                     --sysconfdir=%{sysconfdir}
45 make
46
47 %install
48 make prefix=$RPM_BUILD_ROOT%{prefix} \
49      sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} \
50      install
51 mv $RPM_BUILD_ROOT%{sysconfdir}/siproxd.conf.example \
52    $RPM_BUILD_ROOT%{sysconfdir}/siproxd.conf
53
54 install -d $RPM_BUILD_ROOT%{_initrddir}/
55 install contrib/siproxd.init $RPM_BUILD_ROOT%{_initrddir}/siproxd
56
57 install -d $RPM_BUILD_ROOT%{piddir}
58 install -d $RPM_BUILD_ROOT%{regdir}
59
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(-, root, root)
66 %doc COPYING README AUTHORS INSTALL NEWS ChangeLog doc/FAQ doc/FLI4L_HOWTO.txt
67 %attr(0755,root,root) %{_sbindir}/siproxd
68 %config %{sysconfdir}/siproxd.conf
69 %config %{sysconfdir}/siproxd_passwd.cfg
70 %attr(0755,root,root) %{_initrddir}/siproxd
71
72 %attr(0700,%{siproxduser},root) %{piddir}
73 %attr(0700,%{siproxduser},root) %{regdir}
74
75
76 %post
77 echo "Edit the config file %{sysconfigdir}/siproxd.conf!"
78 /sbin/chkconfig --add %{name}
79
80 %preun
81 if [ $1 = 0 ]; then
82    /sbin/chkconfig --del %{name}
83 fi
84
85 %changelog
86 * Fri Oct 09 2004 Thomas Ries <tries@gmx.net>
87 - startup script in /etc/rc.d/init.d/siproxd
88 - create directories for PID and registration files
89
90 * Fri Oct 31 2003 Thomas Ries <tries@gmx.net>
91 - siproxd is now installed to sbin directory
92
93 * Fri Oct 24 2003 Thomas Ries <tries@gmx.net>
94 - added config files and some more doc files
95 - rename sample config file and remind user to edit it.
96 - minor cleanup
97
98 * Sat Aug 30 2003 Thomas Ries <tries@gmx.net>
99 - always use /etc as sysconfdir
100
101 * Sat Sep 21 2002 Thomas Ries <tries@gmx.net>
102 - first RPM support
103