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