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