]>
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 | # |
4c6b08d0 | 9 | %ifnarch %{ix86} %{x8664} alpha arm hppa ppc s390 s390x sparc sparcv9 sparc64 |
043a7186 JB |
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 |
4f855ec4 | 18 | Version: 1.2 |
b3692cda | 19 | Release: 1 |
658a2f28 | 20 | License: LGPL v2.1+ (library), GPL v3+ (utilities) |
e2c9e4f6 | 21 | Group: Libraries |
3e3e399f | 22 | Source0: http://josefsson.org/libidn/releases/%{name}-%{version}.tar.gz |
4f855ec4 | 23 | # Source0-md5: 29ac1a5bbcd707d06f3fb5bc877f851e |
e2c9e4f6 | 24 | Patch0: %{name}-info.patch |
47ca58ee | 25 | Patch1: %{name}-python.patch |
e2c9e4f6 | 26 | URL: http://www.gnu.org/software/libidn/ |
b3692cda JB |
27 | BuildRequires: autoconf >= 2.61 |
28 | BuildRequires: automake >= 1:1.10 | |
b5892520 | 29 | %{?with_java:BuildRequires: gcc-java} |
b3692cda | 30 | BuildRequires: gettext-devel >= 0.16 |
b5892520 | 31 | %{?with_java:BuildRequires: gjdoc} |
5498ae81 | 32 | BuildRequires: libtool >= 2:1.5 |
043a7186 | 33 | %{?with_dotnet:BuildRequires: mono} |
f22ac790 | 34 | BuildRequires: perl-base |
6f6febb4 | 35 | %{?with_python:BuildRequires: python-devel >= 1:2.3} |
5ea30155 | 36 | %{?with_python:BuildRequires: rpm-pythonprov} |
a281a682 | 37 | BuildRequires: rpmbuild(macros) >= 1.384 |
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 |
658a2f28 | 58 | License: LGPL v2.1+ |
e2c9e4f6 | 59 | Group: Development/Libraries |
5498ae81 | 60 | Requires: %{name} = %{version}-%{release} |
e2c9e4f6 JB |
61 | |
62 | %description devel | |
63 | Header files for libidn library. | |
64 | ||
3591cf04 JR |
65 | %description devel -l pl.UTF-8 |
66 | Pliki nagłówkowe biblioteki libidn. | |
e2c9e4f6 JB |
67 | |
68 | %package static | |
69 | Summary: Static libidn library | |
21d86bf8 | 70 | Summary(pl.UTF-8): Statyczna biblioteka libidn |
658a2f28 | 71 | License: LGPL v2.1+ |
e2c9e4f6 | 72 | Group: Development/Libraries |
5498ae81 | 73 | Requires: %{name}-devel = %{version}-%{release} |
e2c9e4f6 JB |
74 | |
75 | %description static | |
76 | Static libidn library. | |
77 | ||
3591cf04 | 78 | %description static -l pl.UTF-8 |
e2c9e4f6 JB |
79 | Statyczna biblioteka libidn. |
80 | ||
043a7186 JB |
81 | %package -n dotnet-libidn |
82 | Summary: C# binding for libidn | |
21d86bf8 | 83 | Summary(pl.UTF-8): Wiązanie C# dla libidn |
658a2f28 | 84 | License: LGPL v2.1+ |
043a7186 JB |
85 | Group: Libraries |
86 | Requires: %{name} = %{version}-%{release} | |
87 | ||
88 | %description -n dotnet-libidn | |
89 | C# binding for libidn. | |
90 | ||
3591cf04 JR |
91 | %description -n dotnet-libidn -l pl.UTF-8 |
92 | Wiązanie C# dla libidn. | |
043a7186 | 93 | |
ab54d2cd JB |
94 | %package -n emacs-libidn-pkg |
95 | Summary: IDN support files for emacs | |
21d86bf8 | 96 | Summary(pl.UTF-8): Obsługa IDN dla emacsa |
658a2f28 | 97 | License: GPL v3+ |
ab54d2cd | 98 | Group: Applications/Editors/Emacs |
5498ae81 | 99 | Requires: %{name} = %{version}-%{release} |
ab54d2cd JB |
100 | |
101 | %description -n emacs-libidn-pkg | |
102 | IDN support files for emacs. | |
103 | ||
3591cf04 JR |
104 | %description -n emacs-libidn-pkg -l pl.UTF-8 |
105 | Obsługa IDN dla emacsa. | |
ab54d2cd | 106 | |
2815d157 JB |
107 | %package -n java-libidn |
108 | Summary: Java implementation of libidn | |
21d86bf8 | 109 | Summary(pl.UTF-8): Implementacja libidn w Javie |
658a2f28 | 110 | License: LGPL v2.1+ |
2815d157 JB |
111 | Group: Libraries |
112 | Requires: jre | |
113 | ||
114 | %description -n java-libidn | |
115 | Java implementation of libidn (internationalized domain names | |
116 | library). | |
117 | ||
3591cf04 JR |
118 | %description -n java-libidn -l pl.UTF-8 |
119 | Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w | |
2815d157 JB |
120 | Javie. |
121 | ||
122 | %package -n python-idn | |
123 | Summary: Python interface to libidn | |
21d86bf8 | 124 | Summary(pl.UTF-8): Pythonowy interfejs do libidn |
658a2f28 | 125 | License: LGPL v2.1+ |
2815d157 JB |
126 | Group: Libraries/Python |
127 | Requires: %{name} = %{version}-%{release} | |
f671595e | 128 | %pyrequires_eq python-libs |
2815d157 JB |
129 | |
130 | %description -n python-idn | |
131 | Python interface to libidn (internationalized domain names library). | |
132 | ||
3591cf04 JR |
133 | %description -n python-idn -l pl.UTF-8 |
134 | Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw | |
2815d157 JB |
135 | domen). |
136 | ||
e2c9e4f6 JB |
137 | %prep |
138 | %setup -q | |
b6e8491f | 139 | %patch0 -p1 |
47ca58ee | 140 | %patch1 -p1 |
48e22e2d JB |
141 | |
142 | rm -f po/stamp-po | |
b6e8491f | 143 | |
e2c9e4f6 | 144 | %build |
8c25db64 | 145 | %{__gettextize} |
ecce1191 | 146 | %{__libtoolize} |
9242c4a5 | 147 | %{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4 |
ecce1191 JB |
148 | %{__autoconf} |
149 | %{__autoheader} | |
150 | %{__automake} | |
949ca3bf | 151 | JAR=%{_bindir}/fastjar \ |
ab54d2cd | 152 | %configure \ |
043a7186 | 153 | %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \ |
2815d157 | 154 | %{?with_java:--enable-java} \ |
ab54d2cd | 155 | --with-lispdir=%{_emacs_lispdir} |
e2c9e4f6 JB |
156 | |
157 | %{__make} | |
158 | ||
6f6febb4 | 159 | %if %{with python} |
2815d157 | 160 | %{__make} -C contrib/idn-python \ |
e349ab8a | 161 | INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs" |
6f6febb4 | 162 | %endif |
2815d157 | 163 | |
e2c9e4f6 JB |
164 | %install |
165 | rm -rf $RPM_BUILD_ROOT | |
166 | ||
167 | %{__make} install \ | |
168 | DESTDIR=$RPM_BUILD_ROOT | |
169 | ||
6f6febb4 | 170 | %if %{with python} |
2815d157 | 171 | install -D contrib/idn-python/idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so |
6f6febb4 | 172 | %endif |
2815d157 | 173 | |
8c25db64 JB |
174 | %find_lang %{name} |
175 | ||
777b5108 ER |
176 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
177 | ||
e2c9e4f6 JB |
178 | %clean |
179 | rm -rf $RPM_BUILD_ROOT | |
180 | ||
181 | %post | |
182 | /sbin/ldconfig | |
183 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
184 | ||
185 | %postun | |
186 | /sbin/ldconfig | |
187 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
188 | ||
8c25db64 | 189 | %files -f %{name}.lang |
e2c9e4f6 | 190 | %defattr(644,root,root,755) |
1b4dcaf7 | 191 | %doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib |
e2c9e4f6 JB |
192 | %attr(755,root,root) %{_bindir}/idn |
193 | %attr(755,root,root) %{_libdir}/libidn.so.*.*.* | |
194 | %{_mandir}/man1/idn.1* | |
195 | %{_infodir}/libidn.info* | |
98b8400c | 196 | %{_infodir}/libidn-*.png |
e2c9e4f6 JB |
197 | |
198 | %files devel | |
199 | %defattr(644,root,root,755) | |
200 | %attr(755,root,root) %{_libdir}/libidn.so | |
201 | %{_libdir}/libidn.la | |
202 | %{_includedir}/*.h | |
203 | %{_pkgconfigdir}/libidn.pc | |
3e3e399f | 204 | %{_mandir}/man3/* |
e2c9e4f6 JB |
205 | |
206 | %files static | |
207 | %defattr(644,root,root,755) | |
208 | %{_libdir}/libidn.a | |
ab54d2cd | 209 | |
043a7186 JB |
210 | %if %{with dotnet} |
211 | %files -n dotnet-libidn | |
212 | %defattr(644,root,root,755) | |
213 | # why not in gac? does it work here? | |
214 | %{_libdir}/Libidn.dll | |
215 | %endif | |
216 | ||
ab54d2cd JB |
217 | %files -n emacs-libidn-pkg |
218 | %defattr(644,root,root,755) | |
219 | %{_emacs_lispdir}/*.el | |
2815d157 JB |
220 | |
221 | %if %{with java} | |
222 | %files -n java-libidn | |
223 | %defattr(644,root,root,755) | |
754537de | 224 | %{_datadir}/java/libidn*.jar |
2815d157 JB |
225 | %endif |
226 | ||
6f6febb4 | 227 | %if %{with python} |
2815d157 JB |
228 | %files -n python-idn |
229 | %defattr(644,root,root,755) | |
230 | %attr(755,root,root) %{py_sitedir}/idn.so | |
6f6febb4 | 231 | %endif |