4 # Set to 0 to disable bluetooth support
5 %if 0%{?opensuse_bs} && 0%{?sles_version} == 9
10 # Set to 0 to disable PostgreSQL support
12 # Set to 0 to disable MySQL support
14 # Set to 0 to disable DBI support
16 # Set to 0 to disable ODBC support
18 # Set to 0 to disable USB support
20 # Change if using tar.gz sources
24 %{!?__python: %define __python python}
25 %define g_python_sitearch %
(%{__python} -c "from distutils.sysconfig import get_python_lib
; print get_python_lib
(1)"
)
26 %define g_python_major_version %
(%{__python} -c 'import sys
; print sys.version.split
(" "
)[0][:3]'
)
28 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
29 %define gammu_docdir
%_docdir/%{name}-%{version}
31 %define gammu_docdir
%_docdir/%{name}
34 Summary: Mobile phone management utility
37 Group: Hardware
/Mobile
39 Group: Applications
/Communications
41 Vendor: Michal Čihař
<michal@cihar.com
>
43 # Detect build requires, I really hate this crap
48 %define dist_usb_libs libusb
-1_0
-devel
49 %define dist_dbi_libs libdbi
-devel libdbi
-drivers
-dbd
-sqlite3 sqlite
51 # 11.1 changed name of devel package for Bluetooth
52 %if 0%{?suse_version} >= 1110
53 %define dist_bluez_libs bluez
-devel
55 %define dist_bluez_libs bluez
-libs
>= 2.0
58 %define dist_postgres_libs postgresql
-devel
63 %if 0%{?mandriva_version}
65 %define dist_usb_libs libusb
-1.0-devel
66 %define dist_dbi_libs libdbi
-devel libdbi
-drivers
-dbd
-sqlite3 sqlite3
-tools
68 # 64-bit Mandriva has 64 in package name
70 %define mandriva_hack
64
73 # Bluetooth things got renamed several times
74 %if 0%{?mandriva_version} > 2007
75 %define dist_bluez_libs lib
%{?mandriva_hack}bluez
-devel
77 %if 0%{?mandriva_version} > 2006
78 %define dist_bluez_libs lib
%{?mandriva_hack}bluez2
-devel
80 %define dist_bluez_libs libbluez1
-devel
>= 2.0
84 # postgresql-devel does not work for whatever reason in buildservice
85 %if 0%{?mandriva_version} == 2009
86 %define dist_postgres_libs postgresql8.3
-devel
88 %define dist_postgres_libs postgresql
-devel
93 # Fedora / Redhat / Centos
94 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
96 %define dist_usb_libs libusb1
-devel
97 %define dist_dbi_libs libdbi
-devel libdbi
-dbd
-sqlite sqlite
98 %define dist_bluez_libs bluez
-libs
-devel
>= 2.0
99 %define dist_postgres_libs postgresql
-devel
103 #Defaults for not know distributions
104 %define dist_usb_libs libusb1
-devel
105 %define dist_dbi_libs libdbi
-devel libdbi
-dbd
-sqlite sqlite
106 %define dist_bluez_libs bluez
-libs
-devel
>= 2.0
107 %define dist_postgres_libs postgresql
-devel
114 BuildRequires
: %{dist_bluez_libs}
118 BuildRequires
: %{dist_postgres_libs}
122 BuildRequires
: mysql
-devel
126 BuildRequires
: %{dist_dbi_libs}
130 BuildRequires
: unixODBC
-devel
133 BuildRequires
: libgudev
-1_0
-devel glib2
-devel
135 BuildRequires
: python
-devel
137 %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?suse_version} < 1100
138 BuildRequires
: curl
-devel
140 BuildRequires
: libcurl
-devel
144 BuildRequires
: %{dist_usb_libs}
147 BuildRequires
: gettext cmake pkgconfig gcc
149 Source: http
://dl.cihar.com
/gammu
/releases
/gammu
-%{version}.tar.%{extension}
150 URL: http
://wammu.eu
/gammu
/
151 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
154 Gammu is
command line utility and library to work with mobile phones
155 from many vendors. Support
for different models differs
, but basic
156 functions should work with majority of them. Program can work with
157 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
158 integrated radio
, camera
, etc. It also supports daemon mode to send and
161 Currently supported phones include
:
164 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
165 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
166 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
167 * Symbian phones through gnapplet.
169 This package contains Gammu binary as well as some examples.
173 Summary: Development files
for Gammu
174 %if 0%{?suse_version}
175 Group: Development
/Libraries
/C and C
++
177 Group: Development
/Libraries
179 Requires: %{name} = %{version}-%{release} pkgconfig
182 Gammu is
command line utility and library to work with mobile phones
183 from many vendors. Support
for different models differs
, but basic
184 functions should work with majority of them. Program can work with
185 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
186 integrated radio
, camera
, etc. It also supports daemon mode to send and
189 Currently supported phones include
:
192 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
193 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
194 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
195 * Symbian phones through gnapplet.
197 This package contain files needed
for development.
199 %package -n python
-gammu
201 Summary: Python module to communicate with mobile phones
202 %if 0%{?suse_version}
203 Group: Development
/Libraries
/Python
205 Group: Development
/Languages
207 Requires: python
>= %{g_python_major_version}, python < %{g_python_major_version}.99
210 %description -n python
-gammu
211 This provides gammu module
, that can work with any phone Gammu
212 supports
- many Nokias
, Siemens
, Alcatel
, ...
215 Summary: SMS message daemon
216 %if 0%{?suse_version}
217 PreReq
: %insserv_prereq %fillup_prereq
219 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
220 Requires(post
): chkconfig
221 Requires(preun
): chkconfig
222 Requires(preun
): initscripts
224 %if 0%{?suse_version}
225 Group: Hardware
/Mobile
227 Group: Applications
/Communications
231 Gammu is
command line utility and library to work with mobile phones
232 from many vendors. Support
for different models differs
, but basic
233 functions should work with majority of them. Program can work with
234 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
235 integrated radio
, camera
, etc. It also supports daemon mode to send and
238 Currently supported phones include
:
241 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
242 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
243 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
244 * Symbian phones through gnapplet.
246 This package contains Gammu SMS Daemon and tool to inject messages
249 %package -n libGammu7
250 Summary: Mobile phone management library
251 Group: System
/Libraries
253 %description -n libGammu7
254 Gammu is
command line utility and library to work with mobile phones
255 from many vendors. Support
for different models differs
, but basic
256 functions should work with majority of them. Program can work with
257 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
258 integrated radio
, camera
, etc. It also supports daemon mode to send and
261 Currently supported phones include
:
264 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
265 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
266 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
267 * Symbian phones through gnapplet.
269 This package contains Gammu shared library.
271 %package -n libgsmsd7
272 Summary: SMS daemon helper library
273 Group: System
/Libraries
275 %description -n libgsmsd7
276 Gammu is
command line utility and library to work with mobile phones
277 from many vendors. Support
for different models differs
, but basic
278 functions should work with majority of them. Program can work with
279 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
280 integrated radio
, camera
, etc. It also supports daemon mode to send and
283 Currently supported phones include
:
286 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
287 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
288 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
289 * Symbian phones through gnapplet.
291 This package contains Gammu SMS daemon shared library.
300 -DBUILD_SHARED_LIBS
=ON \
301 -DINSTALL_LSB_INIT
=ON \
302 -DBUILD_PYTHON
=/usr
/bin
/python \
303 -DCMAKE_INSTALL_PREFIX
=%_prefix \
304 -DINSTALL_DOC_DIR
=%gammu_docdir \
305 -DINSTALL_LIB_DIR
=%_lib \
306 -DINSTALL_LIBDATA_DIR
=%_lib
307 make %{?_smp_mflags} %{!?_smp_mflags:%{?jobs:-j %jobs}}
314 %if 0%{?suse_version} == 0
318 make -C build
-dir
install DESTDIR
=%buildroot
321 cat libgammu.lang
>> %{name}.lang
322 install -m644 docs
/config
/smsdrc
%buildroot/etc
/gammu
-smsdrc
324 %post -n libGammu7
-p
/sbin
/ldconfig
326 %post -n libgsmsd7
-p
/sbin
/ldconfig
328 %postun -n libGammu7
-p
/sbin
/ldconfig
330 %postun -n libgsmsd7
-p
/sbin
/ldconfig
333 %if 0%{?mandriva_version}
334 %_post_service gammu
-smsd
336 %if 0%{?suse_version}
337 %fillup_and_insserv gammu
-smsd
339 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
340 /sbin
/chkconfig
--add gammu
-smsd
344 %if 0%{?suse_version}
345 %stop_on_removal gammu
-smsd
347 %if 0%{?mandriva_version}
348 %_preun_service gammu
-smsd
350 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
352 /sbin
/service gammu
-smsd stop
>/dev
/null
2>&1
353 /sbin
/chkconfig
--del
<script
>
359 %if 0%{?suse_version}
360 %restart_on_update gammu
-smsd
366 %defattr(-,root
,root
)
368 %config /etc
/bash_completion.d
/gammu
370 %_bindir/gammu
-config
371 %_bindir/gammu
-detect
373 %_mandir/man1
/gammu
.1*
374 %_mandir/man1
/gammu
-config
.1*
375 %_mandir/man1
/gammu
-detect
.1*
376 %_mandir/man1
/jadmaker
.1*
377 %_mandir/man5
/gammurc
.5*
378 %_mandir/man5
/gammu
-backup
.5*
379 %_mandir/man5
/gammu
-smsbackup
.5*
382 %defattr(-,root
,root
)
384 %_bindir/gammu
-smsd
-inject
385 %_bindir/gammu
-smsd
-monitor
386 %_mandir/man1
/gammu
-smsd
*
387 %_mandir/man7
/gammu
-smsd
*
388 %_mandir/man5
/gammu
-smsd
*
389 %attr(755,root
,root
) %config /etc
/init.d
/gammu
-smsd
390 %config /etc
/gammu
-smsdrc
393 %defattr(-,root
,root
)
394 %_libdir/libGammu
*.so.
*
398 %defattr(-,root
,root
)
399 %_libdir/libgsmsd
*.so.
*
402 %defattr(-,root
,root
)
404 %_libdir/pkgconfig
/%name.pc
405 %_libdir/pkgconfig
/%name-smsd.pc
408 %files -n python
-gammu
409 %defattr(-,root
,root
)
410 %doc README.Python python
/examples
417 * Fri Apr
3 2009 Michal Čihař
<michal@cihar.com
> - 1.23.93-1
418 - do not define own %
%version, %
%name, %
%rel
419 - always use pkgconfig
, pkg
-config provides it
420 - do not delete build root on SUSE
421 - fix some package names
(DBI and libusb
) for Fedora
422 - drop support
for Fedora
8
424 * Thu Jan
22 2009 Michal Čihař
<michal@cihar.com
> - 1.21.91-1
425 - merged python
-gammu packaging as upstream merged the code
427 * Fri Oct
24 2008 Michal Čihař
<michal@cihar.com
> - 1.21.0-1
428 - fixed according to Fedora policy
430 * Wed Oct
8 2008 Michal Cihar
<michal@cihar.com
>
431 - do not remove build root
in %
%install
432 - move
make test to %
%check
434 * Tue Oct
7 2008 Michal Cihar
<michal@cihar.com
>
435 - use find_lang macro
437 * Thu Mar
28 2007 Michal Cihar
<michal@cihar.com
>
438 - update to current code status
440 * Thu Jan
6 2005 Michal Cihar
<michal@cihar.com
>
441 - add support
for Mandrake
, thanks to Olivier BERTEN
<Olivier.Berten@advalvas.be
> for testing
442 - use new disable
-bluetooth
444 * Wed Nov
12 2003 Michal Cihar
<michal@cihar.com
>
445 - distiguish between packaging on SUSE and Redhat
446 - build depends on bluez
if wanted
448 * Mon Nov
10 2003 Peter Soos
<sp@osb.hu
>
449 - using rpm macros where is possible
450 - added ldconfig to post
/postun
452 * Mon Nov
03 2003 Michal Cihar
<michal@cihar.com
>
453 - split devel package
455 * Thu Jan
02 2003 Michal Cihar
<michal@cihar.com
>
456 - made it
install in directories that are defined
in rpm
458 * Sun Nov
10 2002 Marcin Wiacek
<marcin@mwiacek.com
>
459 - topnet.pl email no more available
461 * Sun Sep
30 2002 Marcin Wiacek
<marcin
-wiacek@topnet.pl
>
462 - build system is now really working OK
464 * Sat Sep
15 2002 R P Herrold
<herrold@owlriver.com
>