]> git.pld-linux.org Git - packages/libidn.git/blob - libidn.spec
- release 4
[packages/libidn.git] / libidn.spec
1 # TODO:
2 # - prepare package with web-files and java from contrib
3 #
4 # Conditional build:
5 %if "%{pld_release}" == "ac"
6 %bcond_with             dotnet  # don't build C# binding
7 %bcond_with             java    # don't build Java implementation
8 %else
9 %bcond_without  dotnet  # don't build C# binding
10 %bcond_without  java    # don't build Java implementation
11 %endif
12 %bcond_without  python  # don't build python interface
13 #
14 %ifnarch %{ix86} %{x8664} alpha arm hppa ppc s390 s390x sparc sparcv9 sparc64
15 %undefine       with_dotnet
16 %endif
17 %ifarch i386
18 %undefine       with_dotnet
19 %endif
20 Summary:        Internationalized string processing library
21 Summary(pl.UTF-8):      Biblioteka do przetwarzania umiędzynarodowionych łańcuchów
22 Name:           libidn
23 Version:        1.10
24 Release:        4
25 License:        LGPL v2.1+ (library), GPL v3+ (utilities)
26 Group:          Libraries
27 Source0:        http://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz
28 # Source0-md5:  142c21f2bd922c84c4a3c3d469bbc596
29 Patch0:         %{name}-info.patch
30 Patch1:         %{name}-python.patch
31 URL:            http://www.gnu.org/software/libidn/
32 BuildRequires:  autoconf >= 2.61
33 BuildRequires:  automake >= 1:1.10
34 %{?with_java:BuildRequires:     gcc-java}
35 BuildRequires:  gettext-devel >= 0.17
36 %{?with_java:BuildRequires:     gjdoc}
37 BuildRequires:  libtool >= 2:1.5
38 %{?with_dotnet:BuildRequires:   mono}
39 BuildRequires:  perl-base
40 %{?with_python:BuildRequires:   python-devel >= 1:2.3}
41 %{?with_python:BuildRequires:   rpm-pythonprov}
42 BuildRequires:  rpmbuild(macros) >= 1.384
43 BuildRequires:  rpm >= 4.4.9-56
44 BuildRequires:  texinfo >= 4.7
45 Requires(post,postun):  /sbin/ldconfig
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 # is it correct?
49 %define         _emacs_lispdir  %{_datadir}/emacs/site-lisp
50
51 %description
52 GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
53 specifications defined by the IETF Internationalized Domain Names
54 (IDN) working group, used for internationalized domain names.
55
56 %description -l pl.UTF-8
57 GNU Libidn to implementacja specyfikacji Stringprep, Punycode i IDNA
58 zdefiniowanych przez grupę roboczą IETF Internationalized Domain Names
59 (IDN), zajmującą się umiędzynarodowionymi nazwami domen.
60
61 %package devel
62 Summary:        Header files for libidn library
63 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libidn
64 License:        LGPL v2.1+
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67
68 %description devel
69 Header files for libidn library.
70
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe biblioteki libidn.
73
74 %package static
75 Summary:        Static libidn library
76 Summary(pl.UTF-8):      Statyczna biblioteka libidn
77 License:        LGPL v2.1+
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{version}-%{release}
80
81 %description static
82 Static libidn library.
83
84 %description static -l pl.UTF-8
85 Statyczna biblioteka libidn.
86
87 %package -n dotnet-libidn
88 Summary:        C# binding for libidn
89 Summary(pl.UTF-8):      Wiązanie C# dla libidn
90 License:        LGPL v2.1+
91 Group:          Libraries
92 Requires:       %{name} = %{version}-%{release}
93
94 %description -n dotnet-libidn
95 C# binding for libidn.
96
97 %description -n dotnet-libidn -l pl.UTF-8
98 Wiązanie C# dla libidn.
99
100 %package -n emacs-libidn-pkg
101 Summary:        IDN support files for emacs
102 Summary(pl.UTF-8):      Obsługa IDN dla emacsa
103 License:        GPL v3+
104 Group:          Applications/Editors/Emacs
105 Requires:       %{name} = %{version}-%{release}
106
107 %description -n emacs-libidn-pkg
108 IDN support files for emacs.
109
110 %description -n emacs-libidn-pkg -l pl.UTF-8
111 Obsługa IDN dla emacsa.
112
113 %package -n java-libidn
114 Summary:        Java implementation of libidn
115 Summary(pl.UTF-8):      Implementacja libidn w Javie
116 License:        LGPL v2.1+
117 Group:          Libraries
118 Requires:       jre
119
120 %description -n java-libidn
121 Java implementation of libidn (internationalized domain names
122 library).
123
124 %description -n java-libidn -l pl.UTF-8
125 Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w
126 Javie.
127
128 %package -n python-idn
129 Summary:        Python interface to libidn
130 Summary(pl.UTF-8):      Pythonowy interfejs do libidn
131 License:        LGPL v2.1+
132 Group:          Libraries/Python
133 Requires:       %{name} = %{version}-%{release}
134 %pyrequires_eq  python-libs
135
136 %description -n python-idn
137 Python interface to libidn (internationalized domain names library).
138
139 %description -n python-idn -l pl.UTF-8
140 Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw
141 domen).
142
143 %prep
144 %setup -q
145 %patch0 -p1
146 %patch1 -p1
147
148 rm -f po/stamp-po
149
150 # avoid different builds having different timestamps
151 # see http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2008-August/020363.html
152 d='$Date: 2008-10-14 20:33:59 $'
153 d=${d#?Date: }; d=${d%%%% *}; d=$(date -d "$d" '+%d %B %Y')
154 %{__sed} -i -e "s,@value{UPDATED},$d,g" doc/libidn.texi
155
156 %build
157 %{__gettextize}
158 %{__libtoolize}
159 %{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4
160 %{__autoconf}
161 %{__autoheader}
162 %{__automake}
163 JAR=%{_bindir}/fastjar \
164 %configure \
165         %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \
166         %{?with_java:--enable-java} \
167         --with-lispdir=%{_emacs_lispdir}
168
169 %{__make}
170
171 %if %{with python}
172 %{__make} -C contrib/idn-python \
173         INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs"
174 mv contrib/idn-python/idn.so python-idn.so
175 %endif
176
177 %install
178 rm -rf $RPM_BUILD_ROOT
179
180 %{__make} install \
181         DESTDIR=$RPM_BUILD_ROOT
182
183 %if %{with python}
184 install -D python-idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so
185 %endif
186
187 %find_lang %{name}
188
189 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %post
195 /sbin/ldconfig
196 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
197
198 %postun
199 /sbin/ldconfig
200 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
201
202 %files -f %{name}.lang
203 %defattr(644,root,root,755)
204 %doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib
205 %attr(755,root,root) %{_bindir}/idn
206 %attr(755,root,root) %{_libdir}/libidn.so.*.*.*
207 %attr(755,root,root) %ghost %{_libdir}/libidn.so.11
208 %{_mandir}/man1/idn.1*
209 %{_infodir}/libidn.info*
210 %{_infodir}/libidn-*.png
211
212 %files devel
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/libidn.so
215 %{_libdir}/libidn.la
216 %{_includedir}/idn-*.h
217 %{_includedir}/idna.h
218 %{_includedir}/pr29.h
219 %{_includedir}/punycode.h
220 %{_includedir}/stringprep.h
221 %{_includedir}/tld.h
222 %{_pkgconfigdir}/libidn.pc
223 %{_mandir}/man3/idna_*.3*
224 %{_mandir}/man3/pr29_*.3*
225 %{_mandir}/man3/punycode_*.3*
226 %{_mandir}/man3/stringprep*.3*
227 %{_mandir}/man3/tld_*.3*
228
229 %files static
230 %defattr(644,root,root,755)
231 %{_libdir}/libidn.a
232
233 %if %{with dotnet}
234 %files -n dotnet-libidn
235 %defattr(644,root,root,755)
236 # why not in gac? does it work here?
237 %{_libdir}/Libidn.dll
238 %endif
239
240 %files -n emacs-libidn-pkg
241 %defattr(644,root,root,755)
242 %{_emacs_lispdir}/*.el
243
244 %if %{with java}
245 %files -n java-libidn
246 %defattr(644,root,root,755)
247 %{_datadir}/java/libidn*.jar
248 %endif
249
250 %if %{with python}
251 %files -n python-idn
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{py_sitedir}/idn.so
254 %endif
This page took 0.063784 seconds and 4 git commands to generate.