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