]>
Commit | Line | Data |
---|---|---|
2bd4615b | 1 | # TODO: |
b7ba59bb | 2 | # - prepare package with web-files and java from contrib |
2bd4615b | 3 | # |
2815d157 | 4 | # Conditional build: |
a59bf416 ER |
5 | %bcond_without dotnet # don't build C# binding |
6 | %bcond_without java # don't build Java implementation | |
6f6febb4 | 7 | %bcond_without python # don't build python interface |
2815d157 | 8 | # |
043a7186 JB |
9 | %ifnarch %{ix86} %{x8664} arm hppa ppc s390 s390x |
10 | %undefine with_dotnet | |
11 | %endif | |
12 | %ifarch i386 | |
13 | %undefine with_dotnet | |
14 | %endif | |
e2c9e4f6 | 15 | Summary: Internationalized string processing library |
21d86bf8 | 16 | Summary(pl.UTF-8): Biblioteka do przetwarzania umiędzynarodowionych łańcuchów |
e2c9e4f6 | 17 | Name: libidn |
9242c4a5 | 18 | Version: 0.6.11 |
b3692cda | 19 | Release: 1 |
2bd4615b | 20 | License: LGPL v2.1 |
e2c9e4f6 | 21 | Group: Libraries |
3e3e399f | 22 | Source0: http://josefsson.org/libidn/releases/%{name}-%{version}.tar.gz |
9242c4a5 | 23 | # Source0-md5: 535817ae832eadbf289b5e0bf27b5c74 |
e2c9e4f6 | 24 | Patch0: %{name}-info.patch |
47ca58ee | 25 | Patch1: %{name}-python.patch |
48e22e2d | 26 | Patch2: %{name}-pl.po-update.patch |
e2c9e4f6 | 27 | URL: http://www.gnu.org/software/libidn/ |
b3692cda JB |
28 | BuildRequires: autoconf >= 2.61 |
29 | BuildRequires: automake >= 1:1.10 | |
b5892520 | 30 | %{?with_java:BuildRequires: gcc-java} |
b3692cda | 31 | BuildRequires: gettext-devel >= 0.16 |
b5892520 | 32 | %{?with_java:BuildRequires: gjdoc} |
5498ae81 | 33 | BuildRequires: libtool >= 2:1.5 |
043a7186 | 34 | %{?with_dotnet:BuildRequires: mono} |
f22ac790 | 35 | BuildRequires: perl-base |
6f6febb4 | 36 | %{?with_python:BuildRequires: python-devel >= 1:2.3} |
5ea30155 | 37 | %{?with_python:BuildRequires: rpm-pythonprov} |
faf69423 | 38 | BuildRequires: texinfo >= 4.7 |
e2c9e4f6 JB |
39 | Requires(post,postun): /sbin/ldconfig |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
ab54d2cd JB |
42 | # is it correct? |
43 | %define _emacs_lispdir %{_datadir}/emacs/site-lisp | |
44 | ||
e2c9e4f6 JB |
45 | %description |
46 | GNU Libidn is an implementation of the Stringprep, Punycode and IDNA | |
47 | specifications defined by the IETF Internationalized Domain Names | |
48 | (IDN) working group, used for internationalized domain names. | |
49 | ||
3591cf04 | 50 | %description -l pl.UTF-8 |
e2c9e4f6 | 51 | GNU Libidn to implementacja specyfikacji Stringprep, Punycode i IDNA |
3591cf04 JR |
52 | zdefiniowanych przez grupę roboczą IETF Internationalized Domain Names |
53 | (IDN), zajmującą się umiędzynarodowionymi nazwami domen. | |
e2c9e4f6 JB |
54 | |
55 | %package devel | |
56 | Summary: Header files for libidn library | |
21d86bf8 | 57 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libidn |
e2c9e4f6 | 58 | Group: Development/Libraries |
5498ae81 | 59 | Requires: %{name} = %{version}-%{release} |
e2c9e4f6 JB |
60 | |
61 | %description devel | |
62 | Header files for libidn library. | |
63 | ||
3591cf04 JR |
64 | %description devel -l pl.UTF-8 |
65 | Pliki nagłówkowe biblioteki libidn. | |
e2c9e4f6 JB |
66 | |
67 | %package static | |
68 | Summary: Static libidn library | |
21d86bf8 | 69 | Summary(pl.UTF-8): Statyczna biblioteka libidn |
e2c9e4f6 | 70 | Group: Development/Libraries |
5498ae81 | 71 | Requires: %{name}-devel = %{version}-%{release} |
e2c9e4f6 JB |
72 | |
73 | %description static | |
74 | Static libidn library. | |
75 | ||
3591cf04 | 76 | %description static -l pl.UTF-8 |
e2c9e4f6 JB |
77 | Statyczna biblioteka libidn. |
78 | ||
043a7186 JB |
79 | %package -n dotnet-libidn |
80 | Summary: C# binding for libidn | |
21d86bf8 | 81 | Summary(pl.UTF-8): Wiązanie C# dla libidn |
043a7186 JB |
82 | Group: Libraries |
83 | Requires: %{name} = %{version}-%{release} | |
84 | ||
85 | %description -n dotnet-libidn | |
86 | C# binding for libidn. | |
87 | ||
3591cf04 JR |
88 | %description -n dotnet-libidn -l pl.UTF-8 |
89 | Wiązanie C# dla libidn. | |
043a7186 | 90 | |
ab54d2cd JB |
91 | %package -n emacs-libidn-pkg |
92 | Summary: IDN support files for emacs | |
21d86bf8 | 93 | Summary(pl.UTF-8): Obsługa IDN dla emacsa |
ab54d2cd | 94 | Group: Applications/Editors/Emacs |
5498ae81 | 95 | Requires: %{name} = %{version}-%{release} |
ab54d2cd JB |
96 | |
97 | %description -n emacs-libidn-pkg | |
98 | IDN support files for emacs. | |
99 | ||
3591cf04 JR |
100 | %description -n emacs-libidn-pkg -l pl.UTF-8 |
101 | Obsługa IDN dla emacsa. | |
ab54d2cd | 102 | |
2815d157 JB |
103 | %package -n java-libidn |
104 | Summary: Java implementation of libidn | |
21d86bf8 | 105 | Summary(pl.UTF-8): Implementacja libidn w Javie |
2815d157 JB |
106 | Group: Libraries |
107 | Requires: jre | |
108 | ||
109 | %description -n java-libidn | |
110 | Java implementation of libidn (internationalized domain names | |
111 | library). | |
112 | ||
3591cf04 JR |
113 | %description -n java-libidn -l pl.UTF-8 |
114 | Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w | |
2815d157 JB |
115 | Javie. |
116 | ||
117 | %package -n python-idn | |
118 | Summary: Python interface to libidn | |
21d86bf8 | 119 | Summary(pl.UTF-8): Pythonowy interfejs do libidn |
2815d157 JB |
120 | Group: Libraries/Python |
121 | Requires: %{name} = %{version}-%{release} | |
f671595e | 122 | %pyrequires_eq python-libs |
2815d157 JB |
123 | |
124 | %description -n python-idn | |
125 | Python interface to libidn (internationalized domain names library). | |
126 | ||
3591cf04 JR |
127 | %description -n python-idn -l pl.UTF-8 |
128 | Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw | |
2815d157 JB |
129 | domen). |
130 | ||
e2c9e4f6 JB |
131 | %prep |
132 | %setup -q | |
b6e8491f | 133 | %patch0 -p1 |
47ca58ee | 134 | %patch1 -p1 |
48e22e2d JB |
135 | %patch2 -p1 |
136 | ||
137 | rm -f po/stamp-po | |
b6e8491f | 138 | |
e2c9e4f6 | 139 | %build |
8c25db64 | 140 | %{__gettextize} |
ecce1191 | 141 | %{__libtoolize} |
9242c4a5 | 142 | %{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4 |
ecce1191 JB |
143 | %{__autoconf} |
144 | %{__autoheader} | |
145 | %{__automake} | |
949ca3bf | 146 | JAR=%{_bindir}/fastjar \ |
ab54d2cd | 147 | %configure \ |
043a7186 | 148 | %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \ |
2815d157 | 149 | %{?with_java:--enable-java} \ |
ab54d2cd | 150 | --with-lispdir=%{_emacs_lispdir} |
e2c9e4f6 JB |
151 | |
152 | %{__make} | |
153 | ||
6f6febb4 | 154 | %if %{with python} |
2815d157 | 155 | %{__make} -C contrib/idn-python \ |
e349ab8a | 156 | INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs" |
6f6febb4 | 157 | %endif |
2815d157 | 158 | |
e2c9e4f6 JB |
159 | %install |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %{__make} install \ | |
163 | DESTDIR=$RPM_BUILD_ROOT | |
164 | ||
6f6febb4 | 165 | %if %{with python} |
2815d157 | 166 | install -D contrib/idn-python/idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so |
6f6febb4 | 167 | %endif |
2815d157 | 168 | |
8c25db64 JB |
169 | %find_lang %{name} |
170 | ||
777b5108 ER |
171 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
172 | ||
e2c9e4f6 JB |
173 | %clean |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
176 | %post | |
177 | /sbin/ldconfig | |
178 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
179 | ||
180 | %postun | |
181 | /sbin/ldconfig | |
182 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
183 | ||
8c25db64 | 184 | %files -f %{name}.lang |
e2c9e4f6 | 185 | %defattr(644,root,root,755) |
1b4dcaf7 | 186 | %doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib |
e2c9e4f6 JB |
187 | %attr(755,root,root) %{_bindir}/idn |
188 | %attr(755,root,root) %{_libdir}/libidn.so.*.*.* | |
189 | %{_mandir}/man1/idn.1* | |
190 | %{_infodir}/libidn.info* | |
191 | ||
192 | %files devel | |
193 | %defattr(644,root,root,755) | |
194 | %attr(755,root,root) %{_libdir}/libidn.so | |
195 | %{_libdir}/libidn.la | |
196 | %{_includedir}/*.h | |
197 | %{_pkgconfigdir}/libidn.pc | |
3e3e399f | 198 | %{_mandir}/man3/* |
e2c9e4f6 JB |
199 | |
200 | %files static | |
201 | %defattr(644,root,root,755) | |
202 | %{_libdir}/libidn.a | |
ab54d2cd | 203 | |
043a7186 JB |
204 | %if %{with dotnet} |
205 | %files -n dotnet-libidn | |
206 | %defattr(644,root,root,755) | |
207 | # why not in gac? does it work here? | |
208 | %{_libdir}/Libidn.dll | |
209 | %endif | |
210 | ||
ab54d2cd JB |
211 | %files -n emacs-libidn-pkg |
212 | %defattr(644,root,root,755) | |
213 | %{_emacs_lispdir}/*.el | |
2815d157 JB |
214 | |
215 | %if %{with java} | |
216 | %files -n java-libidn | |
217 | %defattr(644,root,root,755) | |
754537de | 218 | %{_datadir}/java/libidn*.jar |
2815d157 JB |
219 | %endif |
220 | ||
6f6febb4 | 221 | %if %{with python} |
2815d157 JB |
222 | %files -n python-idn |
223 | %defattr(644,root,root,755) | |
224 | %attr(755,root,root) %{py_sitedir}/idn.so | |
6f6febb4 | 225 | %endif |