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