]>
Commit | Line | Data |
---|---|---|
8b8b33e8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library build | |
4 | %bcond_without tests # "make check" call | |
5 | # | |
ead1d07e | 6 | Summary: An interface library to access tags for identifying languages |
4e604934 | 7 | Summary(pl.UTF-8): Biblioteka interfejsu dostępu do znaczników identyfikujących języki |
ead1d07e AM |
8 | Name: liblangtag |
9 | Version: 0.4.0 | |
10 | Release: 1 | |
3e23b46d | 11 | License: LGPL v3+ |
ead1d07e | 12 | Group: Libraries |
ead1d07e AM |
13 | Source0: https://bitbucket.org/tagoh/liblangtag/downloads/%{name}-%{version}.tar.bz2 |
14 | # Source0-md5: 54e578c91b1b68e69c72be22adcb2195 | |
15 | Patch0: 0001-Fix-build-issues-with-MSVC.patch | |
16 | Patch1: %{name}-Werror.patch | |
4e604934 | 17 | URL: http://tagoh.bitbucket.org/liblangtag/ |
8b8b33e8 JB |
18 | %{?with_tests:BuildRequires: check-devel >= 0.9.4} |
19 | BuildRequires: glib2-devel >= 2.0 | |
20 | BuildRequires: gobject-introspection-devel >= 1.30.0 | |
21 | BuildRequires: gtk-doc >= 1.0 | |
22 | BuildRequires: libxml2-devel >= 2.1.0 | |
23 | BuildRequires: pkgconfig | |
ead1d07e AM |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
4e604934 | 27 | liblangtag is an interface library to access tags for identifying |
ead1d07e AM |
28 | languages. |
29 | ||
30 | Features: | |
31 | - several subtag registry database supports: | |
32 | - language | |
33 | - extlang | |
34 | - script | |
35 | - region | |
36 | - variant | |
37 | - extension | |
38 | - grandfathered | |
39 | - redundant | |
40 | - handling of the language tags | |
41 | - parser | |
42 | - matching | |
43 | - canonicalizing | |
44 | ||
4e604934 JB |
45 | %description -l pl.UTF-8 |
46 | liblangtag to biblioteka interfejsu dostępu do znaczników | |
47 | identyfikujących języki. | |
48 | ||
49 | Możliwości: | |
50 | - baza danych rejestru podznaczników obsługująca: | |
51 | - język | |
52 | - extlang | |
53 | - pismo | |
54 | - region | |
55 | - wariant | |
56 | - rozszerzenie | |
57 | - dziedziczenie | |
58 | - nadmiarowość | |
59 | - obsługa znaczników języków: | |
60 | - analiza | |
61 | - dopasowywanie | |
62 | - sprowadzanie do postaci kanonicznej | |
63 | ||
ead1d07e | 64 | %package devel |
4e604934 JB |
65 | Summary: Development files for liblangtag |
66 | Summary(pl.UTF-8): Pliki programistyczne biblioteki liblangtag | |
ead1d07e | 67 | Group: Development/Libraries |
3e23b46d | 68 | Requires: %{name} = %{version}-%{release} |
8b8b33e8 | 69 | Requires: glib2-devel >= 2.0 |
ead1d07e AM |
70 | |
71 | %description devel | |
4e604934 JB |
72 | This package contains the header files for developing applications |
73 | that use liblangtag. | |
74 | ||
75 | %description devel -l pl.UTF-8 | |
76 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
77 | wykorzystujących bibliotekę liblangtag. | |
ead1d07e | 78 | |
8b8b33e8 JB |
79 | %package static |
80 | Summary: Static liblangtag library | |
81 | Summary(pl.UTF-8): Statyczna biblioteka liblangtag | |
82 | Group: Development/Libraries | |
83 | Requires: %{name}-devel = %{version}-%{release} | |
84 | ||
85 | %description static | |
86 | Static liblangtag library. | |
87 | ||
88 | %description static -l pl.UTF-8 | |
89 | Statyczna biblioteka liblangtag. | |
90 | ||
ead1d07e AM |
91 | %prep |
92 | %setup -q | |
93 | %patch0 -p1 | |
94 | %patch1 -p1 | |
95 | ||
96 | %build | |
8b8b33e8 | 97 | # NOTE: introspection build is broken as of 0.4.0 |
ead1d07e | 98 | %configure \ |
4e604934 | 99 | --disable-introspection \ |
3e23b46d | 100 | --disable-silent-rules \ |
8b8b33e8 JB |
101 | %{!?with_static_libs:--disable-static} \ |
102 | %{!?with_tests:--disable-test} \ | |
103 | --with-html-dir=%{_gtkdocdir} | |
ead1d07e | 104 | |
8b8b33e8 JB |
105 | %{__make} |
106 | # LD_LIBRARY_PATH=`pwd`/liblangtag/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
107 | ||
108 | %{?with_tests:%{__make} check} | |
ead1d07e AM |
109 | |
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %{__make} install \ | |
114 | DESTDIR=$RPM_BUILD_ROOT | |
115 | ||
4e604934 | 116 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la |
8b8b33e8 | 117 | %{?with_static_libs:%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a} |
ead1d07e AM |
118 | |
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
3e23b46d AM |
122 | %post -p /sbin/ldconfig |
123 | %postun -p /sbin/ldconfig | |
ead1d07e AM |
124 | |
125 | %files | |
126 | %defattr(644,root,root,755) | |
8b8b33e8 | 127 | %doc AUTHORS ChangeLog NEWS README |
4e604934 JB |
128 | %attr(755,root,root) %{_libdir}/liblangtag.so.*.*.* |
129 | %attr(755,root,root) %ghost %{_libdir}/liblangtag.so.1 | |
ead1d07e AM |
130 | %dir %{_libdir}/%{name} |
131 | %attr(755,root,root) %{_libdir}/%{name}/liblangtag-ext-ldml-t.so | |
132 | %attr(755,root,root) %{_libdir}/%{name}/liblangtag-ext-ldml-u.so | |
133 | %{_datadir}/%{name} | |
134 | ||
135 | %files devel | |
136 | %defattr(644,root,root,755) | |
4e604934 JB |
137 | %attr(755,root,root) %{_libdir}/liblangtag.so |
138 | %{_includedir}/liblangtag | |
139 | %{_pkgconfigdir}/liblangtag.pc | |
8b8b33e8 JB |
140 | %{_gtkdocdir}/liblangtag |
141 | ||
142 | %if %{with static_libs} | |
143 | %files static | |
144 | %defattr(644,root,root,755) | |
145 | %{_libdir}/liblangtag.a | |
146 | %endif |