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