]>
Commit | Line | Data |
---|---|---|
80090351 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
c96a2e7e | 4 | %bcond_with capi # API 2.0 support |
80090351 JB |
5 | %bcond_without gui # Qt based GUI |
6 | # | |
518e80b0 | 7 | Summary: Userspace part of Modular ISDN stack |
dafdffb2 | 8 | Summary(pl.UTF-8): Część stosu modularnego ISDN (mISDN) dla przestrzeni użytkownika |
518e80b0 | 9 | Name: mISDNuser |
80090351 | 10 | Version: 2.0.19 |
23472118 | 11 | Release: 3 |
80090351 | 12 | License: LGPL v2.1 |
518e80b0 | 13 | Group: Libraries |
80090351 JB |
14 | # git clone git://git.misdn.eu/mISDNuser.git |
15 | # git archive --format=tar --prefix=mISDNuser-2.0.19/ v2.0.19 | xz > ../mISDNuser-2.0.19.tar.xz | |
16 | Source0: %{name}-%{version}.tar.xz | |
17 | # Source0-md5: fb4bf6c110bea0a30486015ca56e80d8 | |
d2ffb406 | 18 | Patch0: git.patch |
20653a89 | 19 | Patch1: x32.patch |
23472118 JR |
20 | Patch2: const-const.patch |
21 | Patch3: array-bounds.patch | |
4894663c | 22 | URL: http://www.isdn4linux.de/mISDN/ |
80090351 JB |
23 | BuildRequires: autoconf >= 2.63 |
24 | BuildRequires: automake | |
d2ffb406 | 25 | %{?with_capi:BuildRequires: capi4k-utils-devel >= 3:3.27} |
80090351 JB |
26 | BuildRequires: libtool >= 2:2 |
27 | %{?with_capi:BuildRequires: spandsp-devel} | |
28 | BuildRequires: tar >= 1:1.22 | |
29 | BuildRequires: xz | |
30 | %if %{with gui} | |
31 | BuildRequires: QtCore-devel >= 4 | |
32 | BuildRequires: qt4-qmake >= 4 | |
33 | %endif | |
518e80b0 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59f579c6 | 35 | |
518e80b0 | 36 | %description |
37 | mISDN (modular ISDN) is intended to be the new ISDN stack for the | |
38 | Linux 2.6 kernel, from the maintainer of the existing isdn4linux code. | |
39 | This package contains the userspace libraries required to interface | |
40 | directly to mISDN. | |
59f579c6 | 41 | |
4b6420b1 JR |
42 | %description -l pl.UTF-8 |
43 | mISDN (modularny ISDN) ma być nowym stosem ISDN dla jądra Linuksa 2.6 | |
4894663c | 44 | tworzonym przez maintainera obecnego kodu isdn4linux. Ten pakiet |
4b6420b1 | 45 | zawiera biblioteki przestrzeni użytkownika potrzebne do bezpośredniej |
4894663c JB |
46 | komunikacji z mISDN. |
47 | ||
59f579c6 | 48 | %package devel |
49 | Summary: Development files Modular ISDN stack | |
c9fde9ef | 50 | Summary(pl.UTF-8): Pliki nagłówkowe stosu modularnego ISDN |
80090351 | 51 | Group: Development/Libraries |
771dfc59 | 52 | Requires: %{name} = %{version}-%{release} |
59f579c6 | 53 | |
518e80b0 | 54 | %description devel |
518e80b0 | 55 | This package contains the development files for userspace libraries |
56 | required to interface to mISDN, needed for compiling applications | |
57 | which use mISDN directly such as OpenPBX. | |
58 | ||
4b6420b1 | 59 | %description devel -l pl.UTF-8 |
4894663c | 60 | Ten pakiet zawiera pliki programistyczne dla bibliotek przestrzeni |
4b6420b1 JR |
61 | użytkownika służących do komunikacji z mISDN. Jest potrzebny do |
62 | kompilacji aplikacji używających bezpośrednio mISDN, takich jak | |
4894663c JB |
63 | OpenPBX. |
64 | ||
80090351 JB |
65 | %package static |
66 | Summary: Static mISDN library | |
67 | Summary(pl.UTF-8): Statyczna biblioteka mISDN | |
68 | Group: Development/Libraries | |
69 | Requires: %{name} = %{version}-%{release} | |
70 | ||
71 | %description static | |
72 | Static mISDN library. | |
73 | ||
74 | %description static -l pl.UTF-8 | |
75 | Statyczna biblioteka mISDN. | |
76 | ||
59f579c6 | 77 | %package utils |
78 | Summary: Debugging utilities for Modular ISDN stack | |
c9fde9ef | 79 | Summary(pl.UTF-8): Narzędzia diagnostyczne dla stosu modularnego ISDN |
59f579c6 | 80 | Group: Applications/System |
80090351 | 81 | Obsoletes: mISDN-init < 2 |
59f579c6 | 82 | |
59f579c6 | 83 | %description utils |
84 | mISDN (modular ISDN) is intended to be the new ISDN stack for the | |
518e80b0 | 85 | Linux 2.6 kernel, from the maintainer of the existing isdn4linux code. |
86 | This package contains test utilities for mISDN. | |
59f579c6 | 87 | |
4b6420b1 JR |
88 | %description utils -l pl.UTF-8 |
89 | mISDN (modularny ISDN) ma być nowym stosem ISDN dla jądra Linuksa 2.6 | |
4894663c | 90 | tworzonym przez maintainera obecnego kodu isdn4linux. Ten pakiet |
4b6420b1 | 91 | zawiera narzędzia testowe dla mISDN. |
4894663c | 92 | |
80090351 JB |
93 | %package capi |
94 | Summary: mISDN CAPI support | |
95 | Summary(pl.UTF-8): mISDN - obsługa CAPI | |
96 | Group: Applications/System | |
97 | Requires: %{name} = %{version}-%{release} | |
98 | Requires: capi4k-utils-libs | |
99 | ||
100 | %description capi | |
101 | mISDN CAPI support. | |
102 | ||
103 | %description capi -l pl.UTF-8 | |
104 | mISDN - obsługa CAPI. | |
105 | ||
106 | %package gui | |
107 | Summary: GUI application for mISDN | |
108 | Summary(pl.UTF-8): Aplikacja z graficznym interfejsem użytkownika do mISDN | |
109 | Group: X11/Applications | |
110 | Requires: %{name} = %{version}-%{release} | |
111 | ||
112 | %description gui | |
113 | GUI application for mISDN. | |
114 | ||
115 | %description gui -l pl.UTF-8 | |
116 | Aplikacja z graficznym interfejsem użytkownika do mISDN. | |
117 | ||
59f579c6 | 118 | %prep |
80090351 | 119 | %setup -q |
20653a89 JR |
120 | %patch0 -p1 |
121 | %patch1 -p1 | |
23472118 JR |
122 | %patch2 -p1 |
123 | %patch3 -p1 | |
59f579c6 | 124 | |
125 | %build | |
23472118 | 126 | export CFLAGS="%{rpmcflags} -Wno-stringop-truncation" |
80090351 JB |
127 | %{__libtoolize} |
128 | %{__aclocal} | |
129 | %{__autoconf} | |
130 | %{__autoheader} | |
131 | %{__automake} | |
132 | %configure \ | |
133 | QMAKE="/usr/bin/qmake-qt4" \ | |
134 | %{?with_capi:--enable-capi --enable-softdsp} \ | |
135 | %{?with_gui:--enable-gui} \ | |
136 | %{!?with_static_libs:--disable-static} | |
137 | ||
138 | %{__make} | |
59f579c6 | 139 | |
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
80090351 | 142 | |
1f293684 | 143 | %{__make} install \ |
80090351 JB |
144 | DESTDIR=$RPM_BUILD_ROOT |
145 | ||
146 | %if %{with capi} | |
147 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/capi/lib*.la | |
148 | # sample | |
149 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/capi20.conf | |
80090351 | 150 | |
23472118 | 151 | install -d $RPM_BUILD_ROOT/var/run/mISDNcapid |
80090351 JB |
152 | install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
153 | cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/mISDNcapid.conf <<EOF | |
154 | d /var/run/mISDNcapid 755 root root - | |
155 | EOF | |
23472118 JR |
156 | %endif |
157 | ||
158 | install -d $RPM_BUILD_ROOT/lib | |
159 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/udev $RPM_BUILD_ROOT/lib | |
59f579c6 | 160 | |
161 | %clean | |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
1f293684 ER |
164 | %post -p /sbin/ldconfig |
165 | %postun -p /sbin/ldconfig | |
59f579c6 | 166 | |
518e80b0 | 167 | %files |
168 | %defattr(644,root,root,755) | |
80090351 JB |
169 | %attr(755,root,root) %{_libdir}/libmisdn.so.*.*.* |
170 | %attr(755,root,root) %ghost %{_libdir}/libmisdn.so.1 | |
59f579c6 | 171 | |
172 | %files devel | |
518e80b0 | 173 | %defattr(644,root,root,755) |
80090351 JB |
174 | %attr(755,root,root) %{_libdir}/libmisdn.so |
175 | %{_libdir}/libmisdn.la | |
176 | %{_includedir}/mISDN | |
177 | ||
178 | %if %{with static_libs} | |
179 | %files static | |
180 | %defattr(644,root,root,755) | |
181 | %{_libdir}/libmisdn.a | |
182 | %endif | |
59f579c6 | 183 | |
59f579c6 | 184 | %files utils |
518e80b0 | 185 | %defattr(644,root,root,755) |
80090351 JB |
186 | %attr(755,root,root) %{_bindir}/isdn_text2wireshark |
187 | %attr(755,root,root) %{_bindir}/l1oipctrl | |
188 | %attr(755,root,root) %{_bindir}/misdn_E1test | |
189 | %attr(755,root,root) %{_bindir}/misdn_bridge | |
190 | %attr(755,root,root) %{_bindir}/misdn_info | |
191 | %attr(755,root,root) %{_bindir}/misdn_log | |
192 | %attr(755,root,root) %{_sbindir}/misdn_cleanl2 | |
193 | %attr(755,root,root) %{_sbindir}/misdn_rename | |
194 | /lib/udev/rules.d/45-misdn.rules | |
195 | ||
196 | %if %{with capi} | |
197 | %files capi | |
198 | %defattr(644,root,root,755) | |
199 | %doc capi20/capi20.conf.sample | |
200 | %attr(755,root,root) %{_sbindir}/mISDNcapid | |
201 | %attr(755,root,root) %{_libdir}/capi/lib_capi_mod_misdn.so* | |
202 | %dir /var/run/mISDNcapid | |
203 | %{systemdtmpfilesdir}/mISDNcapid.conf | |
204 | %endif | |
205 | ||
206 | %if %{with gui} | |
207 | %files gui | |
208 | %defattr(644,root,root,755) | |
209 | %attr(755,root,root) %{_bindir}/qmisdnwatch | |
210 | %endif |