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: 35b31f06ddbd4dbfd0d1387fd2822c32
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
121 %if "%{_rpmversion}" >= "4.6"
125 %description -n bash-completion-gammu
126 This package provides bash-completion for gammu.
128 %description -n bash-completion-gammu -l pl.UTF-8
129 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gammu.
136 install -d build-static
139 -DBUILD_SHARED_LIBS=OFF \
140 -DINSTALL_LIB_DIR=%{_lib} \
141 -DINSTALL_LIBDATA_DIR=%{_libdir}
148 -DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
149 -DBUILD_SHARED_LIBS=ON \
150 -DINSTALL_LIB_DIR=%{_lib} \
151 -DINSTALL_LIBDATA_DIR=%{_libdir}
155 rm -rf $RPM_BUILD_ROOT
156 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/gammu-smsd,/etc/{rc.d/init.d,sysconfig}} \
157 $RPM_BUILD_ROOT{%{systemdtmpfilesdir},/var/{run,lib}/gammu-smsd} \
158 $RPM_BUILD_ROOT%{_examplesdir}
160 %{__make} -C build install \
161 DESTDIR=$RPM_BUILD_ROOT
163 cp -p build-static/libgammu/libGammu.a $RPM_BUILD_ROOT%{_libdir}
164 cp -p build-static/smsd/libgsmsd.a $RPM_BUILD_ROOT%{_libdir}
166 cp -p docs/config/gammurc $RPM_BUILD_ROOT%{_sysconfdir}
167 cp -p docs/config/smsdrc $RPM_BUILD_ROOT%{_sysconfdir}/gammu-smsd/ttyS0.conf
168 cp -pr docs/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
169 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gammu-smsd
170 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/gammu-smsd
171 cp -p %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
173 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
177 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
180 rm -rf $RPM_BUILD_ROOT
182 %post libs -p /sbin/ldconfig
183 %postun libs -p /sbin/ldconfig
186 %groupadd -g 251 gammu-smsd
187 %useradd -u 251 -d /var/lib/gammu-smsd -s /bin/false -c "Gammu SMSD user" -G dialout -g gammu-smsd gammu-smsd
190 /sbin/chkconfig --add gammu-smsd
191 %service gammu-smsd restart "Gammu SMSD"
194 if [ "$1" = "0" ]; then
195 %service gammu-smsd stop
196 /sbin/chkconfig --del gammu-smsd
200 if [ "$1" = "0" ]; then
201 %groupremove gammu-smsd
202 %userremove gammu-smsd
205 %files -f %{name}.lang
206 %defattr(644,root,root,755)
207 %doc ChangeLog README.en_GB docs/manual/Gammu.htm
208 %attr(755,root,root) %{_bindir}/gammu
209 %attr(755,root,root) %{_bindir}/gammu-detect
210 %attr(755,root,root) %{_bindir}/jadmaker
211 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gammurc
213 %{_mandir}/man1/gammu.1*
214 %{_mandir}/man1/gammu-detect.1*
215 %{_mandir}/man1/jadmaker.1*
216 %{_mandir}/man5/gammu-backup.5*
217 %{_mandir}/man5/gammu-smsbackup.5*
218 %{_mandir}/man5/gammurc.5*
221 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_bindir}/gammu-smsd
224 %attr(755,root,root) %{_bindir}/gammu-smsd-inject
225 %attr(755,root,root) %{_bindir}/gammu-smsd-monitor
226 %attr(754,root,root) /etc/rc.d/init.d/gammu-smsd
227 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/gammu-smsd
228 %dir %{_sysconfdir}/gammu-smsd
229 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gammu-smsd/ttyS0.conf
230 %{systemdunitdir}/gammu-smsd.service
231 %{systemdtmpfilesdir}/gammu.conf
232 %attr(750,root,gammu-smsd) /var/run/gammu-smsd
233 %attr(750,gammu-smsd,gammu-smsd) /var/lib/gammu-smsd
234 %{_mandir}/man1/gammu-smsd.1*
235 %{_mandir}/man1/gammu-smsd-inject.1*
236 %{_mandir}/man1/gammu-smsd-monitor.1*
237 %{_mandir}/man5/gammu-smsdrc.5*
238 %{_mandir}/man7/gammu-smsd-*.7*
240 %files libs -f libgammu.lang
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libGammu.so.*.*
243 %attr(755,root,root) %ghost %{_libdir}/libGammu.so.8
244 %attr(755,root,root) %{_libdir}/libgsmsd.so.*.*.*.*
245 %attr(755,root,root) %ghost %{_libdir}/libgsmsd.so.8
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_bindir}/gammu-config
250 %attr(755,root,root) %{_libdir}/libGammu.so
251 %attr(755,root,root) %{_libdir}/libgsmsd.so
253 %{_pkgconfigdir}/gammu.pc
254 %{_pkgconfigdir}/gammu-smsd.pc
255 %{_mandir}/man1/gammu-config.1*
256 %{_examplesdir}/%{name}-%{version}
259 %defattr(644,root,root,755)
260 %{_libdir}/libGammu.a
261 %{_libdir}/libgsmsd.a
263 %files -n bash-completion-gammu
264 %defattr(644,root,root,755)
265 %{bash_compdir}/gammu