diff options
author | Michal Čihař <michal@cihar.com> | 2009-08-21 12:49:28 +0200 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2009-08-21 12:49:28 +0200 |
commit | 732b7c307042ba529d3ee10eb9a10ff4b81d0127 (patch) | |
tree | f62c2161ba088dafd02cf5ea1352b75d2c74ad36 /gammu.spec | |
parent | 899004145ccbeacd5619fd80990d5939f85c6874 (diff) |
Imported Upstream version 1.25.92
Diffstat (limited to 'gammu.spec')
-rw-r--r-- | gammu.spec | 184 |
1 files changed, 168 insertions, 16 deletions
@@ -1,5 +1,5 @@ Name: gammu -Version: 1.25.91 +Version: 1.25.92 Release: 1 # Set to 0 to disable bluetooth support %if 0%{?opensuse_bs} && 0%{?sles_version} == 9 @@ -20,7 +20,8 @@ Release: 1 # Python name %{!?__python: %define __python python} -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%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]') %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} %define gammu_docdir %_docdir/%{name}-%{version} @@ -153,14 +154,16 @@ Currently supported phones include: * OBEX and IrMC capable phones (Sony-Ericsson, Motorola). * Symbian phones through gnapplet. +This package contains Gammu binary as well as some examples. + %package devel -License: GPL v2 Summary: Development files for Gammu %if 0%{?suse_version} Group: Development/Libraries/C and C++ %else Group: Development/Libraries %endif +Autoreqprov: on Requires: %{name} = %{version}-%{release} pkgconfig %description devel @@ -182,20 +185,98 @@ Currently supported phones include: This package contain files needed for development. %package -n python-gammu -License: GPL v2 Summary: Python module to communicate with mobile phones %if 0%{?suse_version} Group: Development/Libraries/Python %else Group: Development/Languages %endif -Requires: python +Requires: python >= %{g_python_major_version}, python < %{g_python_major_version}.99 %{?py_requires} %description -n python-gammu This provides gammu module, that can work with any phone Gammu supports - many Nokias, Siemens, Alcatel, ... +%package smsd +Summary: SMS message daemon +%if 0%{?suse_version} +PreReq: %insserv_prereq %fillup_prereq +%endif +%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} +Requires(post): chkconfig +Requires(preun): chkconfig +Requires(preun): initscripts +%endif +%if 0%{?suse_version} +Group: Hardware/Mobile +%else +Group: Applications/Communications +%endif + +%description smsd +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contains Gammu SMS Daemon and tool to inject messages +into the queue. + +%package -n libGammu7 +Summary: Mobile phone management library +Group: System/Libraries + +%description -n libGammu7 +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contains Gammu shared library. + +%package -n libgsmsd7 +Summary: SMS daemon helper library +Group: System/Libraries + +%description -n libgsmsd7 +Gammu is command line utility and library to work with mobile phones +from many vendors. Support for different models differs, but basic +functions should work with majority of them. Program can work with +contacts, messages (SMS, EMS and MMS), calendar, todos, filesystem, +integrated radio, camera, etc. It also supports daemon mode to send and +receive SMSes. + +Currently supported phones include: + +* Many Nokia models. +* Alcatel BE5 (501/701), BF5 (715), BH4 (535/735). +* AT capable phones (Siemens, Nokia, Alcatel, IPAQ). +* OBEX and IrMC capable phones (Sony-Ericsson, Motorola). +* Symbian phones through gnapplet. + +This package contains Gammu SMS daemon shared library. + %prep %setup -q @@ -204,6 +285,7 @@ mkdir build-dir cd build-dir cmake ../ \ -DBUILD_SHARED_LIBS=ON \ + -DINSTALL_LSB_INIT=ON \ -DBUILD_PYTHON=/usr/bin/python \ -DCMAKE_INSTALL_PREFIX=%_prefix \ -DINSTALL_DOC_DIR=%gammu_docdir \ @@ -216,29 +298,99 @@ cd build-dir ctest -V %install -%if 0%{?suse_version} == 0 rm -rf %buildroot mkdir %buildroot -%endif make -C build-dir install DESTDIR=%buildroot %find_lang %{name} %find_lang libgammu cat libgammu.lang >> %{name}.lang +install -m644 docs/config/smsdrc %buildroot/etc/gammu-smsdrc + +%post -n libGammu7 -p /sbin/ldconfig + +%post -n libgsmsd7 -p /sbin/ldconfig -%post -p /sbin/ldconfig +%postun -n libGammu7 -p /sbin/ldconfig + +%postun -n libgsmsd7 -p /sbin/ldconfig + +%post smsd +%if 0%{?mandriva_version} +%_post_service gammu-smsd +%endif +%if 0%{?suse_version} +%fillup_and_insserv gammu-smsd +%endif +%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} +/sbin/chkconfig --add gammu-smsd +%endif + +%preun smsd +%if 0%{?suse_version} +%stop_on_removal gammu-smsd +%endif +%if 0%{?mandriva_version} +%_preun_service gammu-smsd +%endif +%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} +if [ $1 = 0 ] ; then + /sbin/service gammu-smsd stop >/dev/null 2>&1 + /sbin/chkconfig --del <script> +fi +%endif + + +%postun smsd +%if 0%{?suse_version} +%restart_on_update gammu-smsd +%insserv_cleanup +%endif -%postun -p /sbin/ldconfig %files -f %name.lang %defattr(-,root,root) -%_bindir/* -%_libdir/*.so.* -%_mandir/man1/* -%_mandir/man5/* -%_mandir/man7/* -%lang(cs) %_mandir/cs %doc %gammu_docdir %config /etc/bash_completion.d/gammu +%_bindir/gammu +%_bindir/gammu-config +%_bindir/jadmaker +%_mandir/man1/gammu.1* +%_mandir/man1/gammu-config.1* +%_mandir/man1/jadmaker.1* +%_mandir/man5/gammurc.5* +%lang(cs) %dir %_mandir/cs +%lang(cs) %dir %_mandir/cs/man5 +%lang(cs) %dir %_mandir/cs/man1 +%lang(cs) %_mandir/cs/man1/gammu.1* +%lang(cs) %_mandir/cs/man1/gammu-config.1* +%lang(cs) %_mandir/cs/man1/jadmaker.1* +%lang(cs) %_mandir/cs/man5/gammurc.5* + +%files smsd +%defattr(-,root,root) +%_bindir/gammu-smsd +%_bindir/gammu-smsd-inject +%_bindir/gammu-smsd-monitor +%_mandir/man1/gammu-smsd* +%_mandir/man7/gammu-smsd* +%_mandir/man5/gammu-smsd* +%lang(cs) %dir %_mandir/cs +%lang(cs) %dir %_mandir/cs/man7 +%lang(cs) %dir %_mandir/cs/man5 +%lang(cs) %dir %_mandir/cs/man1 +%lang(cs) %_mandir/cs/man1/gammu-smsd* +%lang(cs) %_mandir/cs/man7/gammu-smsd* +%lang(cs) %_mandir/cs/man5/gammu-smsd* +%attr(755,root,root) %config /etc/init.d/gammu-smsd +%config /etc/gammu-smsdrc + +%files -n libGammu7 +%defattr(-,root,root) +%_libdir/libGammu*.so.* + +%files -n libgsmsd7 +%defattr(-,root,root) +%_libdir/libgsmsd*.so.* %files devel %defattr(-,root,root) @@ -250,7 +402,7 @@ cat libgammu.lang >> %{name}.lang %files -n python-gammu %defattr(-,root,root) %doc README.Python python/examples -%python_sitearch/* +%g_python_sitearch/* %clean rm -rf %buildroot |