]> git.pld-linux.org Git - packages/gammu.git/blob - gammu.spec
- use tabs; moved to bash-completion 2
[packages/gammu.git] / gammu.spec
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
4 Name:           gammu
5 Version:        1.41.0
6 Release:        1
7 Epoch:          1
8 License:        GPL v2+
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}
37 Provides:       mygnokii2
38 Obsoletes:      mygnokii2
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
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.
49
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.
59
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
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.
78
79 %package libs
80 Summary:        Gammu library
81 Summary(pl.UTF-8):      Biblioteka Gammu
82 Group:          Libraries
83
84 %description libs
85 Gammu tool suite library.
86
87 %description libs -l pl.UTF-8
88 Biblioteka zestawu narzędzi dla telefonów komórkowych Gammu.
89
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}
95 Requires:       bluez-libs-devel
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
103 %package static
104 Summary:        Gammu static library
105 Summary(pl.UTF-8):      Biblioteka statyczna Gammu
106 Group:          Development/Libraries
107 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
108
109 %description static
110 Gammu static library.
111
112 %description static -l pl.UTF-8
113 Biblioteka statyczna zestawu narzędzi dla telefonów komórkowych Gammu.
114
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"
122 BuildArch:      noarch
123 %endif
124
125 %description -n bash-completion-gammu
126 This package provides bash-completion for gammu.
127
128 %description -n bash-completion-gammu -l pl.UTF-8
129 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gammu.
130
131 %prep
132 %setup -q
133 %patch0 -p1
134
135 %build
136 install -d build-static
137 cd build-static
138 %cmake .. \
139         -DBUILD_SHARED_LIBS=OFF \
140         -DINSTALL_LIB_DIR=%{_lib} \
141         -DINSTALL_LIBDATA_DIR=%{_libdir}
142 %{__make}
143 cd ..
144
145 install -d build
146 cd build
147 %cmake .. \
148         -DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
149         -DBUILD_SHARED_LIBS=ON \
150         -DINSTALL_LIB_DIR=%{_lib} \
151         -DINSTALL_LIBDATA_DIR=%{_libdir}
152 %{__make}
153
154 %install
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}
159
160 %{__make} -C build install \
161         DESTDIR=$RPM_BUILD_ROOT
162
163 cp -p build-static/libgammu/libGammu.a $RPM_BUILD_ROOT%{_libdir}
164 cp -p build-static/smsd/libgsmsd.a $RPM_BUILD_ROOT%{_libdir}
165
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
172
173 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
174 %find_lang %{name}
175 %find_lang libgammu
176
177 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post   libs -p /sbin/ldconfig
183 %postun libs -p /sbin/ldconfig
184
185 %pre smsd
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
188
189 %post smsd
190 /sbin/chkconfig --add gammu-smsd
191 %service gammu-smsd restart "Gammu SMSD"
192
193 %preun smsd
194 if [ "$1" = "0" ]; then
195         %service gammu-smsd stop
196         /sbin/chkconfig --del gammu-smsd
197 fi
198
199 %postun smsd
200 if [ "$1" = "0" ]; then
201         %groupremove gammu-smsd
202         %userremove gammu-smsd
203 fi
204
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
212 %{_datadir}/gammu
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*
219
220 %files smsd
221 %defattr(644,root,root,755)
222 %doc docs/sql/*.sql
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*
239
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
246
247 %files devel
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
252 %{_includedir}/gammu
253 %{_pkgconfigdir}/gammu.pc
254 %{_pkgconfigdir}/gammu-smsd.pc
255 %{_mandir}/man1/gammu-config.1*
256 %{_examplesdir}/%{name}-%{version}
257
258 %files static
259 %defattr(644,root,root,755)
260 %{_libdir}/libGammu.a
261 %{_libdir}/libgsmsd.a
262
263 %files -n bash-completion-gammu
264 %defattr(644,root,root,755)
265 %{bash_compdir}/gammu
This page took 0.055054 seconds and 4 git commands to generate.