]>
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 |
98b8400c | 18 | Version: 0.6.14 |
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 |
98b8400c | 23 | # Source0-md5: 040f012a45feb56168853998bb87ad4d |
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} |
faf69423 | 37 | BuildRequires: texinfo >= 4.7 |
e2c9e4f6 JB |
38 | Requires(post,postun): /sbin/ldconfig |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
ab54d2cd JB |
41 | # is it correct? |
42 | %define _emacs_lispdir %{_datadir}/emacs/site-lisp | |
43 | ||
98b8400c JB |
44 | # compress man/info manually as current macross would compress *.png in %{_infodir} |
45 | %define no_install_post_compress_docs 1 | |
46 | ||
e2c9e4f6 JB |
47 | %description |
48 | GNU Libidn is an implementation of the Stringprep, Punycode and IDNA | |
49 | specifications defined by the IETF Internationalized Domain Names | |
50 | (IDN) working group, used for internationalized domain names. | |
51 | ||
3591cf04 | 52 | %description -l pl.UTF-8 |
e2c9e4f6 | 53 | GNU Libidn to implementacja specyfikacji Stringprep, Punycode i IDNA |
3591cf04 JR |
54 | zdefiniowanych przez grupę roboczą IETF Internationalized Domain Names |
55 | (IDN), zajmującą się umiędzynarodowionymi nazwami domen. | |
e2c9e4f6 JB |
56 | |
57 | %package devel | |
58 | Summary: Header files for libidn library | |
21d86bf8 | 59 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libidn |
e2c9e4f6 | 60 | Group: Development/Libraries |
5498ae81 | 61 | Requires: %{name} = %{version}-%{release} |
e2c9e4f6 JB |
62 | |
63 | %description devel | |
64 | Header files for libidn library. | |
65 | ||
3591cf04 JR |
66 | %description devel -l pl.UTF-8 |
67 | Pliki nagłówkowe biblioteki libidn. | |
e2c9e4f6 JB |
68 | |
69 | %package static | |
70 | Summary: Static libidn library | |
21d86bf8 | 71 | Summary(pl.UTF-8): Statyczna biblioteka libidn |
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 |
043a7186 JB |
84 | Group: Libraries |
85 | Requires: %{name} = %{version}-%{release} | |
86 | ||
87 | %description -n dotnet-libidn | |
88 | C# binding for libidn. | |
89 | ||
3591cf04 JR |
90 | %description -n dotnet-libidn -l pl.UTF-8 |
91 | Wiązanie C# dla libidn. | |
043a7186 | 92 | |
ab54d2cd JB |
93 | %package -n emacs-libidn-pkg |
94 | Summary: IDN support files for emacs | |
21d86bf8 | 95 | Summary(pl.UTF-8): Obsługa IDN dla emacsa |
ab54d2cd | 96 | Group: Applications/Editors/Emacs |
5498ae81 | 97 | Requires: %{name} = %{version}-%{release} |
ab54d2cd JB |
98 | |
99 | %description -n emacs-libidn-pkg | |
100 | IDN support files for emacs. | |
101 | ||
3591cf04 JR |
102 | %description -n emacs-libidn-pkg -l pl.UTF-8 |
103 | Obsługa IDN dla emacsa. | |
ab54d2cd | 104 | |
2815d157 JB |
105 | %package -n java-libidn |
106 | Summary: Java implementation of libidn | |
21d86bf8 | 107 | Summary(pl.UTF-8): Implementacja libidn w Javie |
2815d157 JB |
108 | Group: Libraries |
109 | Requires: jre | |
110 | ||
111 | %description -n java-libidn | |
112 | Java implementation of libidn (internationalized domain names | |
113 | library). | |
114 | ||
3591cf04 JR |
115 | %description -n java-libidn -l pl.UTF-8 |
116 | Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w | |
2815d157 JB |
117 | Javie. |
118 | ||
119 | %package -n python-idn | |
120 | Summary: Python interface to libidn | |
21d86bf8 | 121 | Summary(pl.UTF-8): Pythonowy interfejs do libidn |
2815d157 JB |
122 | Group: Libraries/Python |
123 | Requires: %{name} = %{version}-%{release} | |
f671595e | 124 | %pyrequires_eq python-libs |
2815d157 JB |
125 | |
126 | %description -n python-idn | |
127 | Python interface to libidn (internationalized domain names library). | |
128 | ||
3591cf04 JR |
129 | %description -n python-idn -l pl.UTF-8 |
130 | Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw | |
2815d157 JB |
131 | domen). |
132 | ||
e2c9e4f6 JB |
133 | %prep |
134 | %setup -q | |
b6e8491f | 135 | %patch0 -p1 |
47ca58ee | 136 | %patch1 -p1 |
48e22e2d JB |
137 | |
138 | rm -f po/stamp-po | |
b6e8491f | 139 | |
e2c9e4f6 | 140 | %build |
8c25db64 | 141 | %{__gettextize} |
ecce1191 | 142 | %{__libtoolize} |
9242c4a5 | 143 | %{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4 |
ecce1191 JB |
144 | %{__autoconf} |
145 | %{__autoheader} | |
146 | %{__automake} | |
949ca3bf | 147 | JAR=%{_bindir}/fastjar \ |
ab54d2cd | 148 | %configure \ |
043a7186 | 149 | %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \ |
2815d157 | 150 | %{?with_java:--enable-java} \ |
ab54d2cd | 151 | --with-lispdir=%{_emacs_lispdir} |
e2c9e4f6 JB |
152 | |
153 | %{__make} | |
154 | ||
6f6febb4 | 155 | %if %{with python} |
2815d157 | 156 | %{__make} -C contrib/idn-python \ |
e349ab8a | 157 | INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs" |
6f6febb4 | 158 | %endif |
2815d157 | 159 | |
e2c9e4f6 JB |
160 | %install |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
163 | %{__make} install \ | |
164 | DESTDIR=$RPM_BUILD_ROOT | |
165 | ||
6f6febb4 | 166 | %if %{with python} |
2815d157 | 167 | install -D contrib/idn-python/idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so |
6f6febb4 | 168 | %endif |
2815d157 | 169 | |
8c25db64 JB |
170 | %find_lang %{name} |
171 | ||
777b5108 ER |
172 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
173 | ||
98b8400c JB |
174 | gzip -9n $RPM_BUILD_ROOT{%{_mandir}/man{1,3}/*,%{_infodir}/*.info*} |
175 | ||
e2c9e4f6 JB |
176 | %clean |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | ||
179 | %post | |
180 | /sbin/ldconfig | |
181 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
182 | ||
183 | %postun | |
184 | /sbin/ldconfig | |
185 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
186 | ||
8c25db64 | 187 | %files -f %{name}.lang |
e2c9e4f6 | 188 | %defattr(644,root,root,755) |
1b4dcaf7 | 189 | %doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib |
e2c9e4f6 JB |
190 | %attr(755,root,root) %{_bindir}/idn |
191 | %attr(755,root,root) %{_libdir}/libidn.so.*.*.* | |
192 | %{_mandir}/man1/idn.1* | |
193 | %{_infodir}/libidn.info* | |
98b8400c | 194 | %{_infodir}/libidn-*.png |
e2c9e4f6 JB |
195 | |
196 | %files devel | |
197 | %defattr(644,root,root,755) | |
198 | %attr(755,root,root) %{_libdir}/libidn.so | |
199 | %{_libdir}/libidn.la | |
200 | %{_includedir}/*.h | |
201 | %{_pkgconfigdir}/libidn.pc | |
3e3e399f | 202 | %{_mandir}/man3/* |
e2c9e4f6 JB |
203 | |
204 | %files static | |
205 | %defattr(644,root,root,755) | |
206 | %{_libdir}/libidn.a | |
ab54d2cd | 207 | |
043a7186 JB |
208 | %if %{with dotnet} |
209 | %files -n dotnet-libidn | |
210 | %defattr(644,root,root,755) | |
211 | # why not in gac? does it work here? | |
212 | %{_libdir}/Libidn.dll | |
213 | %endif | |
214 | ||
ab54d2cd JB |
215 | %files -n emacs-libidn-pkg |
216 | %defattr(644,root,root,755) | |
217 | %{_emacs_lispdir}/*.el | |
2815d157 JB |
218 | |
219 | %if %{with java} | |
220 | %files -n java-libidn | |
221 | %defattr(644,root,root,755) | |
754537de | 222 | %{_datadir}/java/libidn*.jar |
2815d157 JB |
223 | %endif |
224 | ||
6f6febb4 | 225 | %if %{with python} |
2815d157 JB |
226 | %files -n python-idn |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{py_sitedir}/idn.so | |
6f6febb4 | 229 | %endif |