]> git.pld-linux.org Git - packages/callweaver.git/blobdiff - callweaver.spec
- add logrotate and few missing dirs
[packages/callweaver.git] / callweaver.spec
index 0aa99cd872776500ee96e1456d173d3e745c1a36..73b3cc108fd8a1bb39e624ae4b141f12cf3c855f 100644 (file)
@@ -4,18 +4,19 @@
 %bcond_with    misdn
 %bcond_with    javascript
 #
 %bcond_with    misdn
 %bcond_with    javascript
 #
-%define        _rc     rc3
+%define        snap    20070426
 Summary:       PBX in software
 Summary:       PBX in software
+Summary(pl.UTF-8):     Programowy PBX
 Name:          callweaver
 Name:          callweaver
-Version:       1.2
-Release:       0.1
+Version:       1.1.99
+Release:       0.%{snap}.1
 License:       GPL
 Group:         Applications
 License:       GPL
 Group:         Applications
-# pending name change; for now use old-name tarballs
-Source0:       http://www.openpbx.org/releases/openpbx.org-%{version}_%{_rc}.tar.gz
-# Source0-md5: e270c40626dfa2131cc39dd1352b46f9
+Source0:       http://devs.callweaver.org/trunk_snapshots/%{name}-%{version}.%{snap}.tar.gz
+# Source0-md5: d27ff0129fb8b6058aa310e70dfd0410
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
+Source3:       %{name}.logrotate
 URL:           http://www.callweaver.org/
 BuildRequires: bluez-libs-devel
 BuildRequires: curl-devel
 URL:           http://www.callweaver.org/
 BuildRequires: bluez-libs-devel
 BuildRequires: curl-devel
@@ -25,10 +26,13 @@ BuildRequires:      libvorbis-devel
 BuildRequires: loudmouth-devel
 %{?with_misdn:BuildRequires:   mISDN-devel}
 BuildRequires: mysql-devel
 BuildRequires: loudmouth-devel
 %{?with_misdn:BuildRequires:   mISDN-devel}
 BuildRequires: mysql-devel
+BuildRequires: ncurses-devel
+BuildRequires: opendbx-devel
 BuildRequires: popt-devel
 BuildRequires: postgresql-devel
 BuildRequires: popt-devel
 BuildRequires: postgresql-devel
+BuildRequires: readline-devel
 BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: rpmbuild(macros) >= 1.268
-BuildRequires: spandsp-devel >= 1:0.0.3
+BuildRequires: spandsp-devel >= 1:0.0.4
 BuildRequires: speex-devel
 BuildRequires: sqlite3-devel
 BuildRequires: unixODBC-devel
 BuildRequires: speex-devel
 BuildRequires: sqlite3-devel
 BuildRequires: unixODBC-devel
@@ -42,16 +46,28 @@ Open Source PBX and telephony toolkit. It is, in a sense, middleware
 between Internet and telephony channels on the bottom, and Internet
 and telephony applications at the top.
 
 between Internet and telephony channels on the bottom, and Internet
 and telephony applications at the top.
 
+%description -l pl.UTF-8
+PBX i zestaw narzędziowy do telefonii o otwartych źródłach. Jest to
+middleware między kanałami internetowymy i telefonicznymi z dołu a
+aplikacjami internetowymi i telefonicznymi z góry.
+
 %package devel
 %package devel
-Summary:        Header files and develpment documentation for callweaver
-Group:          Development/Libraries
-Requires:       %{name} = %{epoch}:%{version}-%{release}
+Summary:       Header files for callweaver
+Summary(pl.UTF-8):     Pliki nagłówkowe callweavera
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
 
 %description devel
 
 %description devel
-Header files and develpment documentation for callweaver.
+Header files for callweaver.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe callweavera.
 
 %prep
 
 %prep
-%setup -q -n openpbx.org-%{version}_%{_rc}
+%setup -q -n %{name}-%{version}.%{snap}
+
+# temporary fix
+sed -i -e 's#^>EOF#EOF#' configure*
 
 %build
 %configure \
 
 %build
 %configure \
@@ -82,44 +98,65 @@ Header files and develpment documentation for callweaver.
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d}
 
 %{__make} -j1 install \
        DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
 
 %{__make} -j1 install \
        DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 192 %{name}
+%useradd -u 192 -d /var/lib/callweaver -s /bin/false -c "callweaver" -g %{name} %{name}
+
 %post
 /sbin/chkconfig --add %{name}
 %service %{name} restart
 
 %post
 /sbin/chkconfig --add %{name}
 %service %{name} restart
 
+
 %preun
 if [ "$1" = "0" ]; then
        %service -q %{name} stop
        /sbin/chkconfig --del %{name}
 fi
 
 %preun
 if [ "$1" = "0" ]; then
        %service -q %{name} stop
        /sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+        %userremove callweaver
+       %groupremove %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
-%dir /etc/openpbx.org
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/openpbx.org/*.*
+%doc doc
+%dir %{_sysconfdir}/%{name}
+%attr(640,root,callweaver) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/*
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/*
-%dir %{_libdir}/openpbx.org
-%attr(755,root,root) %{_libdir}/openpbx.org/*.so.*
-%{_libdir}/openpbx.org/*.la
-%dir %{_libdir}/openpbx.org/modules
-%attr(755,root,root) %{_libdir}/openpbx.org/modules/*.so
-%{_libdir}/openpbx.org/modules/*.la
-%{_datadir}/openpbx.org
-%{_mandir}/man*/*
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/*.so.*
+%{_libdir}/%{name}/*.la
+%dir %{_libdir}/%{name}/modules
+%attr(755,root,root) %{_libdir}/%{name}/modules/*.so
+%{_libdir}/%{name}/modules/*.la
+%{_datadir}/%{name}
+
+%attr(750,root,callweaver) %dir %{_var}/lib/callweaver
+%attr(750,callweaver,root) %dir %{_var}/log/callweaver
+%attr(750,callweaver,root) %dir %{_var}/log/callweaver/*
+%attr(750,callweaver,root) %dir %{_var}/run/callweaver
+%attr(750,callweaver,root) %dir %{_var}/spool/callweaver
+
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 
 %files devel
 %defattr(644,root,root,755)
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/openpbx
+%{_includedir}/%{name}
This page took 0.110561 seconds and 4 git commands to generate.