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