]> git.pld-linux.org Git - packages/gammu.git/blob - gammu.spec
- bash-completion.pc is needed
[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.37.0
6 Release:        2
7 Epoch:          1
8 License:        GPL v2+
9 Group:          Applications/Communications
10 Source0:        http://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.xz
11 # Source0-md5:  6e249e6f93461f1fc215ec85cec67740
12 Source1:        %{name}-smsd.init
13 Source2:        %{name}-smsd.sysconfig
14 Source3:        %{name}.tmpfiles
15 Patch0:         %{name}-etc_dir.patch
16 URL:            http://www.gammu.org/
17 BuildRequires:  bash-completion
18 BuildRequires:  bluez-libs-devel
19 BuildRequires:  cmake >= 2.4.6
20 BuildRequires:  curl-devel
21 BuildRequires:  gettext-tools
22 BuildRequires:  mysql-devel
23 BuildRequires:  postgresql-devel
24 BuildRequires:  rpmbuild(macros) >= 1.600
25 BuildRequires:  tar >= 1:1.22
26 BuildRequires:  xz >= 1:4.999.7
27 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
28 Suggests:       %{name}-smsd = %{epoch}:%{version}-%{release}
29 Provides:       mygnokii2
30 Obsoletes:      mygnokii2
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Gammu (formerly known as MyGnokii2) is cellular manager for various
35 mobile phones and modems. It currently supports Nokia 3210, 33xx,
36 3410, 3510, 51xx, 5210, 5510, 61xx, 62xx, 63xx, 6510, 7110, 82xx,
37 8310, 9110, and 9210, and AT devices (such as Siemens, Alcatel,
38 WaveCom, IPAQ, and other). It has a command line version with many
39 functions for ringtones, phonebook, SMS, logos, WAP, date/time, alarm,
40 calls, etc. It can also make full backups and restore them.
41
42 %description -l pl.UTF-8
43 Gammu (poprzednio znany jako MyGnokii2) jest narzędziem do zarządzania
44 różnymi telefonami komórkowymi i modemami. Aktualnie obsługuje Nokie
45 3210, 33xx, 3410, 51xx, 5210, 5510, 61xx, 62xx, 63xx, 6510, 7110,
46 82xx, 8310, 9110 i 3210 oraz urządzenia AT (takie jak Siemens,
47 Alcatel, WaveCom, IPAQ i inne). Ma wersję działającą z linii poleceń z
48 wieloma funkcjami do dzwonków, książki telefonicznej, SMS-ów, logo,
49 WAP, daty/czasu, budzika, dzwonienia itp. Może także wykonywać pełne
50 kopie zapasowe danych i odtwarzać je.
51
52 %package smsd
53 Summary:        Gammu SMS Daemon
54 Summary(pl.UTF-8):      Demon SMS Gammu
55 Group:          Applications/Communications
56 Requires:       %{name} = %{epoch}:%{version}-%{release}
57
58 %description smsd
59 Gammu SMS Daemon is a program that periodically scans GSM modem for
60 received messages, stores them in defined storage and also sends
61 messages enqueued in this storage. It is perfect tool for managing big
62 amounts of received or sent messages and automatically process them.
63
64 %description smsd -l pl.UTF-8
65 Demon SMS Gammu jest programem, który okresowo sprawdza czy modem GSM
66 odebrał jakieś wiadomości, przechowuje je w zdefiniowanym zasobie a
67 także wysyła wiadomości skolejkowane w tym zasobie. Jest idealnym
68 narzędziem do zarządzania dużą ilością otrzymanych lub wysyłanych
69 wiadomości i automatycznego przetwarzania ich.
70
71 %package libs
72 Summary:        Gammu library
73 Summary(pl.UTF-8):      Biblioteka Gammu
74 Group:          Libraries
75
76 %description libs
77 Gammu tool suite library.
78
79 %description libs -l pl.UTF-8
80 Biblioteka zestawu narzędzi dla telefonów komórkowych Gammu.
81
82 %package devel
83 Summary:        Header files for Gammu tool suite for mobile phones
84 Summary(pl.UTF-8):      Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu
85 Group:          Development/Libraries
86 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
87 Requires:       bluez-libs-devel
88
89 %description devel
90 Header files for Gammu tool suite for mobile phones.
91
92 %description devel -l pl.UTF-8
93 Pliki nagłówkowe zestawu narzędzi dla telefonów komórkowych Gammu.
94
95 %package static
96 Summary:        Gammu static library
97 Summary(pl.UTF-8):      Biblioteka statyczna Gammu
98 Group:          Development/Libraries
99 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
100
101 %description static
102 Gammu static library.
103
104 %description static -l pl.UTF-8
105 Biblioteka statyczna zestawu narzędzi dla telefonów komórkowych Gammu.
106
107 %package -n bash-completion-gammu
108 Summary:        bash-completion for gammu
109 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla gammu
110 Group:          Applications/Shells
111 Requires:       %{name} = %{epoch}:%{version}-%{release}
112 Requires:       bash-completion
113 %if "%{_rpmversion}" >= "5"
114 BuildArch:      noarch
115 %endif
116
117 %description -n bash-completion-gammu
118 This package provides bash-completion for gammu.
119
120 %description -n bash-completion-gammu -l pl.UTF-8
121 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gammu.
122
123 %prep
124 %setup -q
125 %patch0 -p1
126
127 %build
128 export CFLAGS="%{optflags}"                                                                                                                                                                                        
129 export CXXFLAGS="%{optflags}"                                                                                                                                                                                      
130 mkdir -p build
131 cd build
132 %cmake .. \
133         -DBUILD_SHARED_LIBS=OFF \
134         -DINSTALL_LIB_DIR=%{_lib} \
135         -DINSTALL_LIBDATA_DIR=%{_libdir}
136 %{__make}
137 mv libgammu/libGammu.a ..
138 mv smsd/libgsmsd.a ..
139 %cmake .. \
140         -DBUILD_SHARED_LIBS=ON \
141         -DINSTALL_LIB_DIR=%{_lib} \
142         -DINSTALL_LIBDATA_DIR=%{_libdir}
143 %{__make}
144
145 %install
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_examplesdir}/%{name}-%{version}} \
148         $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
149
150 %{__make} -C build install \
151         DESTDIR=$RPM_BUILD_ROOT
152
153 install docs/config/gammurc $RPM_BUILD_ROOT%{_sysconfdir}
154 #cp -r docs/develop $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
155 install libGammu.a $RPM_BUILD_ROOT%{_libdir}
156 install libgsmsd.a $RPM_BUILD_ROOT%{_libdir}
157 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-smsd $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
158 install docs/config/smsdrc $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-smsd/ttyS0.conf
159 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-smsd
160 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-smsd
161 install -d $RPM_BUILD_ROOT/%{_varrun}/%{name}-smsd
162 install -d $RPM_BUILD_ROOT/%{_sharedstatedir}/%{name}-smsd
163
164 install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
165
166 %find_lang %{name}
167 %find_lang libgammu
168
169 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
170
171 # for rpm autodeps
172 chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
173
174 %clean
175 rm -rf $RPM_BUILD_ROOT
176
177 %post   libs -p /sbin/ldconfig
178 %postun libs -p /sbin/ldconfig
179
180 %pre smsd
181 %groupadd -g 251 gammu-smsd
182 %useradd -u 251 -d /var/lib/gammu-smsd -s /bin/false -c "Gammu SMSD user" -G dialout -g gammu-smsd gammu-smsd
183
184 %post smsd
185 /sbin/chkconfig --add gammu-smsd
186 %service gammu-smsd restart "Gammu SMSD"
187
188 %preun smsd
189 if [ "$1" = "0" ]; then
190         %service gammu-smsd stop
191         /sbin/chkconfig --del gammu-smsd
192 fi
193
194 %postun smsd
195 if [ "$1" = "0" ]; then
196         %groupremove gammu-smsd
197         %userremove gammu-smsd
198 fi
199
200 %files -f %{name}.lang
201 %defattr(644,root,root,755)
202 %doc AUTHORS ChangeLog docs/manual/Gammu.htm
203 %attr(755,root,root) %{_bindir}/%{name}
204 %attr(755,root,root) %{_bindir}/%{name}-detect
205 %attr(755,root,root) %{_bindir}/jadmaker
206 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gammurc
207 %{_examplesdir}/%{name}-%{version}
208 %{_datadir}/gammu
209 %{_mandir}/man[157]/*
210
211 %files smsd
212 %defattr(644,root,root,755)
213 %doc docs/sql/*.sql
214 %attr(755,root,root) %{_bindir}/gammu-smsd
215 %attr(755,root,root) %{_bindir}/gammu-smsd-inject
216 %attr(755,root,root) %{_bindir}/gammu-smsd-monitor
217 %attr(754,root,root) /etc/rc.d/init.d/%{name}-smsd
218 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-smsd
219 %{_sysconfdir}/%{name}-smsd
220 /usr/lib/tmpfiles.d/%{name}.conf
221 %attr(750,root,gammu-smsd) %{_varrun}/%{name}-smsd
222 %attr(750,gammu-smsd,gammu-smsd) %{_sharedstatedir}/%{name}-smsd
223
224 %files libs -f libgammu.lang
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/libGammu.so.*.*
227 %attr(755,root,root) %{_libdir}/libgsmsd.so.*.*.*.*
228 %attr(755,root,root) %ghost %{_libdir}/libgsmsd.so.7
229 %attr(755,root,root) %ghost %{_libdir}/libGammu.so.7
230
231 %files devel
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_bindir}/%{name}-config
234 %attr(755,root,root) %{_libdir}/libGammu.so
235 %attr(755,root,root) %{_libdir}/libgsmsd.so
236 %{_includedir}/*
237 %{_pkgconfigdir}/gammu.pc
238 %{_pkgconfigdir}/gammu-smsd.pc
239
240 %files static
241 %defattr(644,root,root,755)
242 %{_libdir}/libgsmsd.a
243 %{_libdir}/libGammu.a
244
245 %files -n bash-completion-gammu
246 %defattr(644,root,root,755)
247 %{bash_compdir}/gammu
This page took 0.067515 seconds and 3 git commands to generate.