1 # TODO: gammu-smsd-inject should be in seperate package
2 Summary: Tool suite for mobile phones
3 Summary(pl.UTF-8): Zestaw narzędzi do telefonów komórkowych
9 Group: Applications/Communications
10 Source0: https://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.xz
11 # Source0-md5: 552e547864f2367115c165f84f341ee6
12 Source1: %{name}-smsd.init
13 Source2: %{name}-smsd.sysconfig
14 Source3: %{name}.tmpfiles
15 Patch0: %{name}-etc_dir.patch
16 URL: https://gammu.eu/
17 BuildRequires: bluez-libs-devel
18 BuildRequires: cmake >= 3.0
19 BuildRequires: curl-devel
20 BuildRequires: gcc >= 6:4.7
21 BuildRequires: gettext-tools
22 BuildRequires: glib2-devel >= 2
23 BuildRequires: libdbi-devel
24 BuildRequires: libusb-devel >= 1.0
25 BuildRequires: mysql-devel
26 BuildRequires: pkgconfig
27 BuildRequires: postgresql-devel
28 BuildRequires: rpmbuild(macros) >= 1.605
29 BuildRequires: sqlite3 >= 3
30 BuildRequires: systemd-units
31 BuildRequires: tar >= 1:1.22
32 BuildRequires: udev-glib-devel
33 BuildRequires: unixODBC-devel
34 BuildRequires: xz >= 1:4.999.7
35 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
36 Suggests: %{name}-smsd = %{epoch}:%{version}-%{release}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Gammu (formerly known as MyGnokii2) is cellular manager for various
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.
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
53 3210, 33xx, 3410, 51xx, 5210, 5510, 61xx, 62xx, 63xx, 6510, 7110,
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.
61 Summary: Gammu SMS Daemon
62 Summary(pl.UTF-8): Demon SMS Gammu
63 Group: Applications/Communications
64 Requires: %{name} = %{epoch}:%{version}-%{release}
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.
72 %description smsd -l pl.UTF-8
73 Demon SMS Gammu jest programem, który okresowo sprawdza czy modem GSM
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
77 wiadomości i automatycznego przetwarzania ich.
80 Summary: Gammu library
81 Summary(pl.UTF-8): Biblioteka Gammu
85 Gammu tool suite library.
87 %description libs -l pl.UTF-8
88 Biblioteka zestawu narzędzi dla telefonów komórkowych Gammu.
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}
95 Requires: bluez-libs-devel
98 Header files for Gammu tool suite for mobile phones.
100 %description devel -l pl.UTF-8
101 Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu.
104 Summary: Gammu static library
105 Summary(pl.UTF-8): Biblioteka statyczna Gammu
106 Group: Development/Libraries
107 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
110 Gammu static library.
112 %description static -l pl.UTF-8
113 Biblioteka statyczna zestawu narzędzi dla telefonów komórkowych Gammu.
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
119 Requires: %{name} = %{epoch}:%{version}-%{release}
120 Requires: bash-completion >= 2.0
123 %description -n bash-completion-gammu
124 This package provides bash-completion for gammu.
126 %description -n bash-completion-gammu -l pl.UTF-8
127 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gammu.
134 install -d build-static
137 -DBUILD_SHARED_LIBS=OFF \
138 -DINSTALL_LIB_DIR=%{_lib} \
139 -DINSTALL_LIBDATA_DIR=%{_libdir}
146 -DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
147 -DBUILD_SHARED_LIBS=ON \
148 -DINSTALL_LIB_DIR=%{_lib} \
149 -DINSTALL_LIBDATA_DIR=%{_libdir}
153 rm -rf $RPM_BUILD_ROOT
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}
158 %{__make} -C build install \
159 DESTDIR=$RPM_BUILD_ROOT
161 cp -p build-static/libgammu/libGammu.a $RPM_BUILD_ROOT%{_libdir}
162 cp -p build-static/smsd/libgsmsd.a $RPM_BUILD_ROOT%{_libdir}
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
171 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
175 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
178 rm -rf $RPM_BUILD_ROOT
180 %post libs -p /sbin/ldconfig
181 %postun libs -p /sbin/ldconfig
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
188 /sbin/chkconfig --add gammu-smsd
189 %service gammu-smsd restart "Gammu SMSD"
192 if [ "$1" = "0" ]; then
193 %service gammu-smsd stop
194 /sbin/chkconfig --del gammu-smsd
198 if [ "$1" = "0" ]; then
199 %groupremove gammu-smsd
200 %userremove gammu-smsd
203 %files -f %{name}.lang
204 %defattr(644,root,root,755)
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
208 %attr(755,root,root) %{_bindir}/jadmaker
209 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gammurc
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*
219 %defattr(644,root,root,755)
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
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*
238 %files libs -f libgammu.lang
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libGammu.so.*.*
241 %attr(755,root,root) %ghost %{_libdir}/libGammu.so.8
242 %attr(755,root,root) %{_libdir}/libgsmsd.so.*.*.*.*
243 %attr(755,root,root) %ghost %{_libdir}/libgsmsd.so.8
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_bindir}/gammu-config
248 %attr(755,root,root) %{_libdir}/libGammu.so
249 %attr(755,root,root) %{_libdir}/libgsmsd.so
251 %{_pkgconfigdir}/gammu.pc
252 %{_pkgconfigdir}/gammu-smsd.pc
253 %{_mandir}/man1/gammu-config.1*
254 %{_examplesdir}/%{name}-%{version}
257 %defattr(644,root,root,755)
258 %{_libdir}/libGammu.a
259 %{_libdir}/libgsmsd.a
261 %files -n bash-completion-gammu
262 %defattr(644,root,root,755)
263 %{bash_compdir}/gammu