]>
Commit | Line | Data |
---|---|---|
71e85635 JB |
1 | # |
2 | # Conditional build: | |
f4508c07 | 3 | %bcond_without apidocs # API documentation |
71e85635 JB |
4 | %bcond_with tests # unit tests |
5 | ||
95c82a1c JB |
6 | Summary: Free software implementation of IDNA2008 |
7 | Summary(pl.UTF-8): Wolnodostępna implementacja IDNA2008 | |
8 | Name: libidn2 | |
cf1a4ecc | 9 | Version: 2.3.4 |
71e85635 | 10 | Release: 1 |
5fc826e7 | 11 | License: LGPL v3+ or GPL v2+ (library), GPL v3+ (utilities) |
95c82a1c | 12 | Group: Libraries |
5bb796c5 | 13 | Source0: https://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz |
cf1a4ecc | 14 | # Source0-md5: a12109804fc9c5d7fb31f068c66655b8 |
95c82a1c JB |
15 | Patch0: %{name}-info.patch |
16 | URL: http://www.gnu.org/software/libidn/ | |
17 | BuildRequires: autoconf >= 2.61 | |
b2792ea2 | 18 | BuildRequires: automake >= 1:1.14 |
19655d5d | 19 | BuildRequires: gettext-tools >= 0.21 |
f4508c07 | 20 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.14} |
95c82a1c JB |
21 | BuildRequires: help2man |
22 | BuildRequires: libtool >= 2:2.0 | |
843427c3 | 23 | BuildRequires: libunistring-devel |
5bb796c5 | 24 | BuildRequires: rpm-build >= 4.6 |
95c82a1c | 25 | BuildRequires: rpmbuild(macros) >= 1.98 |
843427c3 | 26 | BuildRequires: tar >= 1:1.22 |
95c82a1c JB |
27 | BuildRequires: texinfo >= 4.7 |
28 | Requires(post,postun): /sbin/ldconfig | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Libidn2 is a free software implementation of internationalized domain | |
33 | names (IDNA2008). | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Libidn2 to wolnodostępna implementacja specyfikacji | |
37 | umiędzynarodowionych nazw domen (IDNA2008). | |
38 | ||
39 | %package devel | |
40 | Summary: Header files for libidn2 library | |
41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libidn2 | |
42 | License: LGPL v2.1+ | |
43 | Group: Development/Libraries | |
44 | Requires: %{name} = %{version}-%{release} | |
843427c3 | 45 | Requires: libunistring-devel |
95c82a1c JB |
46 | |
47 | %description devel | |
48 | Header files for libidn2 library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki libidn2. | |
52 | ||
53 | %package static | |
54 | Summary: Static libidn2 library | |
55 | Summary(pl.UTF-8): Statyczna biblioteka libidn2 | |
56 | License: LGPL v2.1+ | |
57 | Group: Development/Libraries | |
58 | Requires: %{name}-devel = %{version}-%{release} | |
59 | ||
60 | %description static | |
61 | Static libidn2 library. | |
62 | ||
63 | %description static -l pl.UTF-8 | |
64 | Statyczna biblioteka libidn2. | |
65 | ||
f4508c07 MK |
66 | %package apidocs |
67 | Summary: libidn2 API documentation | |
5bb796c5 | 68 | Summary(pl.UTF-8): Dokumentacja API biblioteki libidb2 |
f4508c07 MK |
69 | Group: Documentation |
70 | Requires: gtk-doc-common | |
d45df9a0 | 71 | Conflicts: libidn2-devel < 2.3.1 |
f4508c07 MK |
72 | BuildArch: noarch |
73 | ||
74 | %description apidocs | |
5bb796c5 | 75 | libidn2 API documentation. |
f4508c07 MK |
76 | |
77 | %description apidocs -l pl.UTF-8 | |
5bb796c5 | 78 | Dokumentacja API biblioteki libidn2. |
f4508c07 | 79 | |
95c82a1c JB |
80 | %prep |
81 | %setup -q | |
82 | %patch0 -p1 | |
176e065d JB |
83 | |
84 | %{__rm} po/stamp-po | |
95c82a1c JB |
85 | |
86 | %build | |
13b136aa | 87 | %{__gettextize} |
95c82a1c | 88 | %{__libtoolize} |
b2792ea2 | 89 | %{__aclocal} -I m4 -I unistring/m4 -I gl/m4 |
95c82a1c JB |
90 | %{__autoconf} |
91 | %{__autoheader} | |
92 | %{__automake} | |
93 | %configure \ | |
843427c3 | 94 | --disable-silent-rules \ |
f4508c07 | 95 | %{?with_apidocs:--enable-gtk-doc} \ |
95c82a1c JB |
96 | --with-html-dir=%{_gtkdocdir} |
97 | ||
98 | %{__make} | |
99 | ||
416e4763 AM |
100 | %{?with_tests:%{__make} check} |
101 | ||
95c82a1c JB |
102 | %install |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %{__make} install \ | |
106 | DESTDIR=$RPM_BUILD_ROOT | |
107 | ||
f4508c07 MK |
108 | %if !%{with apidocs} |
109 | %{__rm} -r $RPM_BUILD_ROOT%{_gtkdocdir}/libidn2 | |
110 | %endif | |
111 | ||
176e065d JB |
112 | %find_lang %{name} |
113 | ||
95c82a1c JB |
114 | %clean |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
a7d9236e JK |
117 | %post |
118 | /sbin/ldconfig | |
119 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
95c82a1c | 120 | |
a7d9236e JK |
121 | %postun |
122 | /sbin/ldconfig | |
123 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
95c82a1c | 124 | |
176e065d | 125 | %files -f %{name}.lang |
95c82a1c | 126 | %defattr(644,root,root,755) |
843427c3 | 127 | %doc AUTHORS COPYING ChangeLog NEWS README.md |
95c82a1c | 128 | %attr(755,root,root) %{_bindir}/idn2 |
95c82a1c | 129 | %attr(755,root,root) %{_libdir}/libidn2.so.*.*.* |
ee0d0452 | 130 | %attr(755,root,root) %ghost %{_libdir}/libidn2.so.0 |
95c82a1c JB |
131 | %{_mandir}/man1/idn2.1* |
132 | %{_infodir}/libidn2.info* | |
133 | ||
134 | %files devel | |
135 | %defattr(644,root,root,755) | |
136 | %attr(755,root,root) %{_libdir}/libidn2.so | |
137 | %{_libdir}/libidn2.la | |
138 | %{_includedir}/idn2.h | |
843427c3 | 139 | %{_pkgconfigdir}/libidn2.pc |
95c82a1c | 140 | %{_mandir}/man3/idn2_*.3* |
95c82a1c JB |
141 | |
142 | %files static | |
143 | %defattr(644,root,root,755) | |
144 | %{_libdir}/libidn2.a | |
f4508c07 MK |
145 | |
146 | %if %{with apidocs} | |
147 | %files apidocs | |
148 | %defattr(644,root,root,755) | |
149 | %{_gtkdocdir}/libidn2 | |
150 | %endif |