Accepting request 64517 from home:adra:branches:hardware

OBS-URL: https://build.opensuse.org/request/show/64517
OBS-URL: https://build.opensuse.org/package/show/hardware/gammu?expand=0&rev=10
This commit is contained in:
Adrian Schröter 2011-03-21 06:40:54 +00:00 committed by Git OBS Bridge
parent 58b5f296e7
commit d56eabfa40
2 changed files with 25 additions and 8 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Mar 18 20:03:02 UTC 2011 - asterios.dramis@gmail.com
- Spec file updates:
* Use UTC time/date for "Remove build time references" fix.
* Don't clean buildroot in %install section.
* Change permissions of gammu-smsd in %install section.
* Add rc-symlink for gammu-smsd.
* Fix for empty %postun check on non-SUSE distros.
* Minor other updates.
-------------------------------------------------------------------
Fri Mar 11 20:13:17 UTC 2011 - asterios.dramis@gmail.com

View File

@ -32,7 +32,7 @@ Source0: http://sourceforge.net/projects/%{name}/files/%{name}/%{version}
Patch0: gammu-smsd.lsb_unknown-lsb-keyword.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Python name
# Python location
%{!?__python: %define __python python}
%define g_python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%define g_python_major_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0][:3]')
@ -290,8 +290,8 @@ supports - many Nokias, Siemens, Alcatel, ...
%setup -q
%patch0
# Remove build time references - Fix rpmlint warning "file-contains-date-and-time"
FAKE_BUILDTIME=$(LC_ALL=C date -r %{_sourcedir}/%{name}.changes '+%H:%M')
FAKE_BUILDDATE=$(LC_ALL=C date -r %{_sourcedir}/%{name}.changes '+%b %e %Y')
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%H:%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%b %e %Y')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" gammu/gammu.c gammu-detect/main.c libgammu/gsmstate.c smsd/inject.c smsd/monitor.c smsd/main.c
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" gammu/gammu.c gammu-detect/main.c libgammu/gsmstate.c libgammu/phone/dummy/dummy.c smsd/inject.c smsd/monitor.c smsd/main.c
@ -315,9 +315,7 @@ cd ..
#cd ..
%install
%if 0%{?suse_version} == 0
rm -rf %{buildroot}
mkdir %{buildroot}
%if !0%{?suse_version}
make -C build-dir install DESTDIR=%{buildroot}
%else
cd build-dir
@ -325,6 +323,13 @@ cd build-dir
cd ..
%endif
# Change permissions
chmod 755 %{buildroot}%{_sysconfdir}/init.d/gammu-smsd
# rc-symlink for gammu-smsd
mkdir -p %{buildroot}%{_sbindir}
ln -sf ../../etc/init.d/gammu-smsd %{buildroot}%{_sbindir}/rcgammu-smsd
# Install config file
install -p -m 0644 docs/config/smsdrc %{buildroot}%{_sysconfdir}/gammu-smsdrc
@ -367,8 +372,8 @@ if [ $1 = 0 ] ; then
fi
%endif
%postun smsd
%if 0%{?suse_version}
%postun smsd
%restart_on_update gammu-smsd
%insserv_cleanup
%endif
@ -406,10 +411,11 @@ fi
%files smsd
%defattr(-,root,root,-)
%config %{_sysconfdir}/gammu-smsdrc
%attr(755,root,root) %config %{_sysconfdir}/init.d/gammu-smsd
%config %{_sysconfdir}/init.d/gammu-smsd
%{_bindir}/gammu-smsd
%{_bindir}/gammu-smsd-inject
%{_bindir}/gammu-smsd-monitor
%{_sbindir}/rcgammu-smsd
%doc %{_mandir}/man1/gammu-smsd-inject.1%{ext_man}
%doc %{_mandir}/man1/gammu-smsd-monitor.1%{ext_man}
%doc %{_mandir}/man1/gammu-smsd.1%{ext_man}