]> git.pld-linux.org Git - packages/gammu.git/blame - gammu.spec
- try to fix build with python2.7
[packages/gammu.git] / gammu.spec
CommitLineData
bc4e3c70
TP
1Summary: Tool suite for mobile phones
2Summary(pl.UTF-8): Zestaw narzędzi do telefonów komórkowych
e4c35d43 3Name: gammu
1bb8440d 4Version: 1.28.0
5Release: 1
f836a189 6Epoch: 1
2585acb8 7License: GPL v2+
f836a189 8Group: Applications/Communications
736b1f60 9Source0: http://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.bz2
1bb8440d 10# Source0-md5: 1cddf45348b0c8cebcc14c9e693c6c9a
202fe725 11Source1: %{name}-smsd.init
12Source2: %{name}-smsd.sysconfig
e721ad3e 13Patch0: %{name}-etc_dir.patch
a331b5e4 14URL: http://www.gammu.org/
54d86c80 15BuildRequires: bluez-libs-devel
281fa2ca 16BuildRequires: cmake >= 2.4.6
8f45ba1e 17BuildRequires: curl-devel
9ab30125 18BuildRequires: gettext-devel
101d1802 19BuildRequires: mysql-devel
736b1f60 20BuildRequires: postgresql-devel
3ca020a3 21BuildRequires: python-devel >= 1:2.5
3ca020a3 22BuildRequires: rpm-pythonprov
2585acb8 23BuildRequires: rpmbuild(macros) >= 1.293
3b248c9a 24Requires: %{name}-libs = %{epoch}:%{version}-%{release}
202fe725 25Suggests: %{name}-smsd = %{epoch}:%{version}-%{release}
e4c35d43
PG
26Provides: mygnokii2
27Obsoletes: mygnokii2
f836a189 28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
e4c35d43 31Gammu (formerly known as MyGnokii2) is cellular manager for various
99e7d737
JB
32mobile phones and modems. It currently supports Nokia 3210, 33xx,
333410, 3510, 51xx, 5210, 5510, 61xx, 62xx, 63xx, 6510, 7110, 82xx,
348310, 9110, and 9210, and AT devices (such as Siemens, Alcatel,
35WaveCom, IPAQ, and other). It has a command line version with many
36functions for ringtones, phonebook, SMS, logos, WAP, date/time, alarm,
37calls, etc. It can also make full backups and restore them.
38
1b85dc8f
JR
39%description -l pl.UTF-8
40Gammu (poprzednio znany jako MyGnokii2) jest narzędziem do zarządzania
41różnymi telefonami komórkowymi i modemami. Aktualnie obsługuje Nokie
99e7d737 423210, 33xx, 3410, 51xx, 5210, 5510, 61xx, 62xx, 63xx, 6510, 7110,
1b85dc8f
JR
4382xx, 8310, 9110 i 3210 oraz urządzenia AT (takie jak Siemens,
44Alcatel, WaveCom, IPAQ i inne). Ma wersję działającą z linii poleceń z
45wieloma funkcjami do dzwonków, książki telefonicznej, SMS-ów, logo,
46WAP, daty/czasu, budzika, dzwonienia itp. Może także wykonywać pełne
47kopie zapasowe danych i odtwarzać je.
f836a189 48
202fe725 49%package smsd
50Summary: Gammu SMS Daemon
51Summary(pl.UTF-8): Demon SMS Gammu
52Group: Applications/Communications
53Requires: %{name} = %{epoch}:%{version}-%{release}
54
55%description smsd
56Gammu SMS Daemon is a program that periodically scans GSM modem for
57received messages, stores them in defined storage and also sends
58messages enqueued in this storage. It is perfect tool for managing big
59amounts of received or sent messages and automatically process them.
60
61%description smsd -l pl.UTF-8
62Demon SMS Gammu jest programem, któr okresowo sprawdza czy modem GSM
1bb8440d 63odebrał jakieś wiadomości, przechowuje je w zdefiniowanym zasobie a
64także wysyła wiadomości skolejkowane w tym zasobie. Jest idealnym
65narzędziem do zarządzania dużą ilością otrzymanych lub wysyłanych
66wiadomości i atomatycznego przetwarzania ich.
202fe725 67
e9da6d17 68%package libs
736b1f60 69Summary: Gammu library
70Summary(pl.UTF-8): Biblioteka Gammu
71Group: Libraries
e9da6d17 72
73%description libs
74Gammu tool suite library.
75
35238559 76%description libs -l pl.UTF-8
e9da6d17 77Biblioteka zestawu narzędzi dla telefonów komórkowych Gammu.
78
3b248c9a
JB
79%package devel
80Summary: Header files for Gammu tool suite for mobile phones
81Summary(pl.UTF-8): Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu
82Group: Development/Libraries
83Requires: %{name}-libs = %{epoch}:%{version}-%{release}
a860cb8f 84Requires: bluez-libs-devel
3b248c9a
JB
85
86%description devel
87Header files for Gammu tool suite for mobile phones.
88
89%description devel -l pl.UTF-8
90Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu.
91
3ca020a3 92%package -n python-gammu
93Summary: Python bingings for Gammu library
94Summary(pl.UTF-8): Wiązania języka Python dla biblioteki Gammu
95Group: Development/Languages/Python
40579025 96Requires: %{name}-libs = %{epoch}:%{version}-%{release}
3ca020a3 97%pyrequires_eq python-modules
3ca020a3 98
99%description -n python-gammu
100Python bingings for Gammu library.
101
2585acb8 102%description -n python-gammu -l pl.UTF-8
3ca020a3 103Wiązania języka Python dla biblioteki Gammu.
104
e9da6d17 105%package static
736b1f60 106Summary: Gammu static library
107Summary(pl.UTF-8): Biblioteka statyczna Gammu
108Group: Development/Libraries
3b248c9a 109Requires: %{name}-devel = %{epoch}:%{version}-%{release}
e9da6d17 110
111%description static
112Gammu static library.
113
35238559 114%description static -l pl.UTF-8
e9da6d17 115Biblioteka statyczna zestawu narzędzi dla telefonów komórkowych Gammu.
116
1b61967a
BZ
117%package -n bash-completion-gammu
118Summary: bash-completion for gammu
119Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gammu
120Group: Applications/Shells
5e34605d 121Requires: %{name} = %{epoch}:%{version}-%{release}
2585acb8 122Requires: bash-completion
1b61967a
BZ
123
124%description -n bash-completion-gammu
125This package provides bash-completion for gammu.
126
127%description -n bash-completion-gammu -l pl.UTF-8
128Pakiet ten dostarcza bashowe uzupełnianie nazw dla gammu.
129
f836a189 130%prep
44bab158 131%setup -q
8f45ba1e 132%patch0 -p1
f836a189 133
134%build
35238559
TP
135mkdir -p build
136cd build
2314bcd8 137%cmake .. \
35238559 138 -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
2314bcd8 139 -DCMAKE_VERBOSE_MAKEFILE=ON \
8f45ba1e 140 -DBUILD_SHARED_LIBS=OFF \
5e447162
MB
141 -DINSTALL_LIB_DIR=%{_lib} \
142 -DINSTALL_LIBDATA_DIR=%{_libdir} \
09a6a3a0 143 -DBUILD_PYTHON=%{_bindir}/python%{py_ver} \
8f45ba1e 144 %{?debug:-DCMAKE_BUILD_TYPE="Debug"}
36390489 145%{__make}
6baa676b 146mv libgammu/libGammu.a ..
147mv smsd/libgsmsd.a ..
2314bcd8 148%cmake .. \
35238559 149 -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
2314bcd8 150 -DCMAKE_VERBOSE_MAKEFILE=ON \
8f45ba1e 151 -DBUILD_SHARED_LIBS=ON \
5e447162
MB
152 -DINSTALL_LIB_DIR=%{_lib} \
153 -DINSTALL_LIBDATA_DIR=%{_libdir} \
09a6a3a0 154 -DBUILD_PYTHON=%{_bindir}/python%{py_ver} \
8f45ba1e 155 %{?debug:-DCMAKE_BUILD_TYPE="Debug"}
36390489 156%{__make}
f836a189 157
158%install
159rm -rf $RPM_BUILD_ROOT
35238559 160install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_examplesdir}/%{name}-%{version}}
3b248c9a
JB
161
162%{__make} -C build install \
35238559 163 DESTDIR=$RPM_BUILD_ROOT
35238559 164
6baa676b 165install docs/config/gammurc $RPM_BUILD_ROOT%{_sysconfdir}
1b61967a 166cp -r docs/develop $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
35238559 167install libGammu.a $RPM_BUILD_ROOT%{_libdir}
6baa676b 168install libgsmsd.a $RPM_BUILD_ROOT%{_libdir}
202fe725 169install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-smsd $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
170install docs/config/smsdrc $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-smsd/ttyS0.conf
171install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-smsd
172cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-smsd
173install -d $RPM_BUILD_ROOT/%{_varrun}/%{name}-smsd
174install -d $RPM_BUILD_ROOT/%{_sharedstatedir}/%{name}-smsd
6baa676b 175
9ab30125 176%find_lang %{name}
59428bc4 177%find_lang libgammu
11342faf 178
179rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
f836a189 180
5f592fd2
JB
181# for rpm autodeps
182chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
183
f836a189 184%clean
185rm -rf $RPM_BUILD_ROOT
186
a860cb8f
JB
187%post libs -p /sbin/ldconfig
188%postun libs -p /sbin/ldconfig
11342faf 189
202fe725 190%pre smsd
191%groupadd -g 251 gammu-smsd
192%useradd -u 251 -d /var/lib/gammu-smsd -s /bin/false -c "Gammu SMSD user" -G dialout -g gammu-smsd gammu-smsd
193
194%post smsd
195/sbin/chkconfig --add gammu-smsd
196%service gammu-smsd restart "Gammu SMSD"
197
198%preun smsd
199if [ "$1" = "0" ]; then
200 %service gammu-smsd stop
201 /sbin/chkconfig --del gammu-smsd
202fi
203
204%postun smsd
205if [ "$1" = "0" ]; then
206 %groupremove gammu-smsd
207 %userremove gammu-smsd
208fi
209
9ab30125 210%files -f %{name}.lang
f836a189 211%defattr(644,root,root,755)
1bb8440d 212%doc AUTHORS BUGS ChangeLog docs/user/gammu.html docs/user/gammu.html README README.Python
9ab30125 213%doc %lang(it) docs/user/gammu.it.txt docs/user/readme.it.txt
e4c35d43 214%attr(755,root,root) %{_bindir}/%{name}
6baa676b 215%attr(755,root,root) %{_bindir}/jadmaker
a3c0577f 216%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gammurc
a3c0577f 217%{_examplesdir}/%{name}-%{version}
40579025
KK
218%{_mandir}/man[157]/*
219%lang(cs) %{_mandir}/cs/man[157]/*
e9da6d17 220
202fe725 221%files smsd
1bb8440d 222%defattr(644,root,root,755)
202fe725 223%doc docs/sql/*.sql
224%attr(755,root,root) %{_bindir}/gammu-smsd
225%attr(755,root,root) %{_bindir}/gammu-smsd-inject
226%attr(755,root,root) %{_bindir}/gammu-smsd-monitor
227%attr(754,root,root) /etc/rc.d/init.d/%{name}-smsd
1bb8440d 228%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-smsd
202fe725 229%{_sysconfdir}/%{name}-smsd
230%attr(750,root,gammu-smsd) %{_varrun}/%{name}-smsd
231%attr(750,gammu-smsd,gammu-smsd) %{_sharedstatedir}/%{name}-smsd
232
59428bc4 233%files libs -f libgammu.lang
2585acb8 234%defattr(644,root,root,755)
a860cb8f 235%attr(755,root,root) %{_libdir}/libGammu.so.*.*
6baa676b 236%attr(755,root,root) %{_libdir}/libgsmsd.so.*.*.*.*
59428bc4
AF
237%attr(755,root,root) %ghost %{_libdir}/libgsmsd.so.?
238%attr(755,root,root) %ghost %{_libdir}/libGammu.so.?
3b248c9a 239
e9da6d17 240%files devel
241%defattr(644,root,root,755)
35238559 242%attr(755,root,root) %{_bindir}/%{name}-config
a860cb8f 243%attr(755,root,root) %{_libdir}/libGammu.so
6baa676b 244%attr(755,root,root) %{_libdir}/libgsmsd.so
e9da6d17 245%{_includedir}/*
6baa676b 246%dir %{py_sitedir}/gammu/
247%attr(755,root,root) %{py_sitedir}/gammu/_gammu.so
a860cb8f 248%{_pkgconfigdir}/gammu.pc
6baa676b 249%{_pkgconfigdir}/gammu-smsd.pc
e9da6d17 250
3ca020a3 251%files -n python-gammu
252%defattr(644,root,root,755)
253%dir %{py_sitedir}/gammu
254%attr(755,root,root) %{py_sitedir}/gammu/*.so
255%{py_sitedir}/gammu/*.py
256
e9da6d17 257%files static
2585acb8 258%defattr(644,root,root,755)
6baa676b 259%{_libdir}/libgsmsd.a
a860cb8f 260%{_libdir}/libGammu.a
1b61967a
BZ
261
262%files -n bash-completion-gammu
263%defattr(644,root,root,755)
264%{_sysconfdir}/bash_completion.d/gammu
This page took 0.06618 seconds and 4 git commands to generate.