Summary: Send and receive short messages through GSM modems Name: smstools Version: 3.0.6 Release: 1%{?dist} License: GPL Group: System Environment/Daemons Source0: http://smstools3.kekekasvi.com/packages/smstools3-%{version}.tar.gz Source2: smstools.init Source3: smstools.logrotate Patch0: smstools-1.15.7-stats.patch URL: http://smstools3.kekekasvi.com BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: mm-devel Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service %description The SMS Server Tools are made to send and receive short messages through GSM modems. It supports easy file interfaces and it can run external programs for automatic actions. %prep %setup -q -n smstools3 %patch0 -p 1 -b .stats mv doc manual # Fix file permissions find -wholename './scripts' -prune -o -type f -and -not -name '*.sh' -print | xargs chmod 644 # Fix permissions make packaging as %%doc easier chmod 644 scripts/* mv examples/.procmailrc examples/procmailrc mv examples/.qmailrc examples/qmailrc %build %{__make} %{?_smp_mflags} CFLAGS="%{optflags}" %install rm -rf $RPM_BUILD_ROOT %{__install} -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/smstools %{__install} -D -m 664 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/smstools %{__install} -D -m 600 examples/smsd.conf.full %{buildroot}%{_sysconfdir}/smsd.conf %{__install} -D -m 755 src/smsd %{buildroot}%{_sbindir}/smsd %{__install} -D -m 755 scripts/sendsms %{buildroot}%{_bindir}/sendsms %{__install} -D -m 755 scripts/sms2html %{buildroot}%{_bindir}/sms2html %{__install} -D -m 755 scripts/sms2unicode %{buildroot}%{_bindir}/sms2unicode %{__install} -D -m 755 scripts/sms2xml %{buildroot}%{_bindir}/sms2xml %{__install} -D -m 755 scripts/unicode2sms %{buildroot}%{_bindir}/unicode2sms %{__install} -d %{buildroot}%{_localstatedir}/spool/sms/checked %{__install} -d %{buildroot}%{_localstatedir}/spool/sms/failed %{__install} -d %{buildroot}%{_localstatedir}/spool/sms/incoming %{__install} -d %{buildroot}%{_localstatedir}/spool/sms/outgoing %{__install} -d %{buildroot}%{_localstatedir}/spool/sms/sent %clean rm -rf $RPM_BUILD_ROOT %post # This adds the proper /etc/rc*.d links for the script /sbin/chkconfig --add smstools %preun if [ "$1" = "0" ]; then /sbin/service smstools stop >/dev/null 2>&1 /sbin/chkconfig --del smstools fi %postun if [ "$1" -ge "1" ]; then /sbin/service smstools condrestart >/dev/null 2>&1 fi %files %defattr(-,root,root,-) %doc LICENSE manual/ examples/ scripts/checkhandler-utf-8 scripts/email2sms scripts/eventhandler-utf-8 %doc scripts/mysmsd scripts/regular_run scripts/smsevent scripts/smsresend scripts/sql_demo %{_sbindir}/* %{_bindir}/* %config %{_sysconfdir}/logrotate.d/smstools %config(noreplace) %{_sysconfdir}/smsd.conf %{_initrddir}/smstools %dir %attr(750,root,root) %{_localstatedir}/spool/sms/ %dir %attr(750,root,root) %{_localstatedir}/spool/sms/checked %dir %attr(750,root,root) %{_localstatedir}/spool/sms/failed %dir %attr(750,root,root) %{_localstatedir}/spool/sms/incoming %dir %attr(750,root,root) %{_localstatedir}/spool/sms/outgoing %dir %attr(750,root,root) %{_localstatedir}/spool/sms/sent %changelog * Sat Apr 07 2007 Andreas Thienemann 3.0.6-1 - Updated to version 3.0.6 - Reverted daemonize patch as it is not needed anymore * Wed Nov 30 2005 Andreas Thienemann 1.15.7-3 - Fixed logrotate script * Sun Sep 13 2005 Andreas Thienemann 1.15.7-2 - Now with statistics support * Sat Sep 12 2005 Andreas Thienemann 1.15.7-1 - Initial spec.