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 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
134 BuildRequires
: libgudev1
-devel glib2
-devel
136 %if 0%{?mandriva_version}
137 BuildRequires
: libgudev
-1.0-devel glib2
-devel
139 BuildRequires
: libgudev
-1_0
-devel glib2
-devel
143 BuildRequires
: python
-devel
145 %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?rhel} || 0%{?suse_version} < 1100
146 BuildRequires
: curl
-devel
148 BuildRequires
: libcurl
-devel
152 BuildRequires
: %{dist_usb_libs}
155 BuildRequires
: gettext cmake pkgconfig gcc
157 Source: http
://dl.cihar.com
/gammu
/releases
/gammu
-%{version}.tar.%{extension}
158 URL: http
://wammu.eu
/gammu
/
159 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
162 Gammu is
command line utility and library to work with mobile phones
163 from many vendors. Support
for different models differs
, but basic
164 functions should work with majority of them. Program can work with
165 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
166 integrated radio
, camera
, etc. It also supports daemon mode to send and
169 Currently supported phones include
:
172 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
173 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
174 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
175 * Symbian phones through gnapplet.
177 This package contains Gammu binary as well as some examples.
181 Summary: Development files
for Gammu
182 %if 0%{?suse_version}
183 Group: Development
/Libraries
/C and C
++
185 Group: Development
/Libraries
187 Requires: %{name} = %{version}-%{release} pkgconfig
190 Gammu is
command line utility and library to work with mobile phones
191 from many vendors. Support
for different models differs
, but basic
192 functions should work with majority of them. Program can work with
193 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
194 integrated radio
, camera
, etc. It also supports daemon mode to send and
197 Currently supported phones include
:
200 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
201 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
202 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
203 * Symbian phones through gnapplet.
205 This package contain files needed
for development.
207 %package -n python
-gammu
209 Summary: Python module to communicate with mobile phones
210 %if 0%{?suse_version}
211 Group: Development
/Libraries
/Python
213 Group: Development
/Languages
215 Requires: python
>= %{g_python_major_version}, python < %{g_python_major_version}.99
218 %description -n python
-gammu
219 This provides gammu module
, that can work with any phone Gammu
220 supports
- many Nokias
, Siemens
, Alcatel
, ...
223 Summary: SMS message daemon
224 %if 0%{?suse_version}
225 PreReq
: %insserv_prereq %fillup_prereq
227 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
228 Requires(post
): chkconfig
229 Requires(preun
): chkconfig
230 Requires(preun
): initscripts
232 %if 0%{?suse_version}
233 Group: Hardware
/Mobile
235 Group: Applications
/Communications
239 Gammu is
command line utility and library to work with mobile phones
240 from many vendors. Support
for different models differs
, but basic
241 functions should work with majority of them. Program can work with
242 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
243 integrated radio
, camera
, etc. It also supports daemon mode to send and
246 Currently supported phones include
:
249 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
250 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
251 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
252 * Symbian phones through gnapplet.
254 This package contains Gammu SMS Daemon and tool to inject messages
257 %package -n libGammu7
258 Summary: Mobile phone management library
259 Group: System
/Libraries
261 %description -n libGammu7
262 Gammu is
command line utility and library to work with mobile phones
263 from many vendors. Support
for different models differs
, but basic
264 functions should work with majority of them. Program can work with
265 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
266 integrated radio
, camera
, etc. It also supports daemon mode to send and
269 Currently supported phones include
:
272 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
273 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
274 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
275 * Symbian phones through gnapplet.
277 This package contains Gammu shared library.
279 %package -n libgsmsd7
280 Summary: SMS daemon helper library
281 Group: System
/Libraries
283 %description -n libgsmsd7
284 Gammu is
command line utility and library to work with mobile phones
285 from many vendors. Support
for different models differs
, but basic
286 functions should work with majority of them. Program can work with
287 contacts
, messages
(SMS
, EMS and MMS
), calendar
, todos
, filesystem
,
288 integrated radio
, camera
, etc. It also supports daemon mode to send and
291 Currently supported phones include
:
294 * Alcatel BE5
(501/701), BF5
(715), BH4
(535/735).
295 * AT capable phones
(Siemens
, Nokia
, Alcatel
, IPAQ
).
296 * OBEX and IrMC capable phones
(Sony
-Ericsson
, Motorola
).
297 * Symbian phones through gnapplet.
299 This package contains Gammu SMS daemon shared library.
308 -DBUILD_SHARED_LIBS
=ON \
309 -DINSTALL_LSB_INIT
=ON \
310 -DBUILD_PYTHON
=/usr
/bin
/python \
311 -DCMAKE_INSTALL_PREFIX
=%_prefix \
312 -DINSTALL_DOC_DIR
=%gammu_docdir \
313 -DINSTALL_LIB_DIR
=%_lib \
314 -DINSTALL_LIBDATA_DIR
=%_lib
315 make %{?_smp_mflags} %{!?_smp_mflags:%{?jobs:-j %jobs}}
322 %if 0%{?suse_version} == 0
326 make -C build
-dir
install DESTDIR
=%buildroot
329 cat libgammu.lang
>> %{name}.lang
330 install -m644 docs
/config
/smsdrc
%buildroot/etc
/gammu
-smsdrc
332 %post -n libGammu7
-p
/sbin
/ldconfig
334 %post -n libgsmsd7
-p
/sbin
/ldconfig
336 %postun -n libGammu7
-p
/sbin
/ldconfig
338 %postun -n libgsmsd7
-p
/sbin
/ldconfig
341 %if 0%{?mandriva_version}
342 %_post_service gammu
-smsd
344 %if 0%{?suse_version}
345 %fillup_and_insserv gammu
-smsd
347 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
348 /sbin
/chkconfig
--add gammu
-smsd
352 %if 0%{?suse_version}
353 %stop_on_removal gammu
-smsd
355 %if 0%{?mandriva_version}
356 %_preun_service gammu
-smsd
358 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
360 /sbin
/service gammu
-smsd stop
>/dev
/null
2>&1
361 /sbin
/chkconfig
--del
<script
>
367 %if 0%{?suse_version}
368 %restart_on_update gammu
-smsd
374 %defattr(-,root
,root
)
376 %config /etc
/bash_completion.d
/gammu
378 %_bindir/gammu
-config
379 %_bindir/gammu
-detect
381 %_mandir/man1
/gammu
.1*
382 %_mandir/man1
/gammu
-config
.1*
383 %_mandir/man1
/gammu
-detect
.1*
384 %_mandir/man1
/jadmaker
.1*
385 %_mandir/man5
/gammurc
.5*
386 %_mandir/man5
/gammu
-backup
.5*
387 %_mandir/man5
/gammu
-smsbackup
.5*
390 %defattr(-,root
,root
)
392 %_bindir/gammu
-smsd
-inject
393 %_bindir/gammu
-smsd
-monitor
394 %_mandir/man1
/gammu
-smsd
*
395 %_mandir/man7
/gammu
-smsd
*
396 %_mandir/man5
/gammu
-smsd
*
397 %attr(755,root
,root
) %config /etc
/init.d
/gammu
-smsd
398 %config /etc
/gammu
-smsdrc
401 %defattr(-,root
,root
)
402 %_libdir/libGammu
*.so.
*
406 %defattr(-,root
,root
)
407 %_libdir/libgsmsd
*.so.
*
410 %defattr(-,root
,root
)
412 %_libdir/pkgconfig
/%name.pc
413 %_libdir/pkgconfig
/%name-smsd.pc
416 %files -n python
-gammu
417 %defattr(-,root
,root
)
418 %doc README.Python python
/examples
425 * Fri Apr
3 2009 Michal Čihař
<michal@cihar.com
> - 1.23.93-1
426 - do not define own %
%version, %
%name, %
%rel
427 - always use pkgconfig
, pkg
-config provides it
428 - do not delete build root on SUSE
429 - fix some package names
(DBI and libusb
) for Fedora
430 - drop support
for Fedora
8
432 * Thu Jan
22 2009 Michal Čihař
<michal@cihar.com
> - 1.21.91-1
433 - merged python
-gammu packaging as upstream merged the code
435 * Fri Oct
24 2008 Michal Čihař
<michal@cihar.com
> - 1.21.0-1
436 - fixed according to Fedora policy
438 * Wed Oct
8 2008 Michal Cihar
<michal@cihar.com
>
439 - do not remove build root
in %
%install
440 - move
make test to %
%check
442 * Tue Oct
7 2008 Michal Cihar
<michal@cihar.com
>
443 - use find_lang macro
445 * Thu Mar
28 2007 Michal Cihar
<michal@cihar.com
>
446 - update to current code status
448 * Thu Jan
6 2005 Michal Cihar
<michal@cihar.com
>
449 - add support
for Mandrake
, thanks to Olivier BERTEN
<Olivier.Berten@advalvas.be
> for testing
450 - use new disable
-bluetooth
452 * Wed Nov
12 2003 Michal Cihar
<michal@cihar.com
>
453 - distiguish between packaging on SUSE and Redhat
454 - build depends on bluez
if wanted
456 * Mon Nov
10 2003 Peter Soos
<sp@osb.hu
>
457 - using rpm macros where is possible
458 - added ldconfig to post
/postun
460 * Mon Nov
03 2003 Michal Cihar
<michal@cihar.com
>
461 - split devel package
463 * Thu Jan
02 2003 Michal Cihar
<michal@cihar.com
>
464 - made it
install in directories that are defined
in rpm
466 * Sun Nov
10 2002 Marcin Wiacek
<marcin@mwiacek.com
>
467 - topnet.pl email no more available
469 * Sun Sep
30 2002 Marcin Wiacek
<marcin
-wiacek@topnet.pl
>
470 - build system is now really working OK
472 * Sat Sep
15 2002 R P Herrold
<herrold@owlriver.com
>