blob: 250a4af12010a87662cabb762ca146269d2832e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
%global girname LangTag
%global girapiversion 0.6
%global soversion 1
%global soversion_gobject 0
Name: liblangtag
Version: 0.6.2
Release: 1%{?dist}
Summary: An interface library to access tags for identifying languages
License: LGPLv3+ or MPLv2.0
URL: http://tagoh.bitbucket.org/liblangtag/
Source0: https://bitbucket.org/tagoh/%{name}/downloads/%{name}-%{version}.tar.bz2
Patch0: liblangtag-noparallel-gir.patch
# Begin: Anolis customized patches
# backport patch from upstream
Patch1001: 1001-liblangtag-gcc10.patch
# End: Anolis customized patches
Requires: %{name}-data = %{version}-%{release}
BuildRequires: glibc-common
%if ! 0%{?flatpak}
BuildRequires: gtk-doc
%endif
BuildRequires: pkgconfig(check)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libxml-2.0)
%description
%{name} is an interface library to access tags for identifying
languages.
Features:
* several subtag registry database supports:
- language
- extlang
- script
- region
- variant
- extension
- grandfathered
- redundant
* handling of the language tags
- parser
- matching
- canonicalizing
%package data
Summary: %{name} data files
License: UCD
BuildArch: noarch
%description data
The %{name}-data package contains data files for %{name}.
%package gobject
Summary: GObject introspection for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gobject
The %{name}-gobject package contains files for GObject introspection for
%{name}.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation of %{name} API
BuildArch: noarch
%description doc
The %{name}-doc package contains documentation files for %{name}.
%prep
%autosetup -p1
%build
%configure \
%if 0%{?flatpak}
--disable-gtk-doc \
%endif
--disable-silent-rules --disable-static --enable-shared --enable-introspection --disable-test
sed -i \
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
libtool
export LD_LIBRARY_PATH=`pwd`/liblangtag/.libs:`pwd`/liblangtag-gobject/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
rm -f %{buildroot}/%{_libdir}/*.la %{buildroot}/%{_libdir}/%{name}/*.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post gobject -p /sbin/ldconfig
%postun gobject -p /sbin/ldconfig
%check
export LD_LIBRARY_PATH=`pwd`/liblangtag/.libs:`pwd`/liblangtag-gobject/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
make %{?_smp_mflags} check
%files
%{_libdir}/%{name}.so.%{soversion}
%{_libdir}/%{name}.so.%{soversion}.*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.so
%files data
%license COPYING
%{_datadir}/%{name}
%files gobject
%{_libdir}/%{name}-gobject.so.%{soversion_gobject}
%{_libdir}/%{name}-gobject.so.%{soversion_gobject}.*
%{_libdir}/girepository-1.0/%{girname}-%{girapiversion}.typelib
%files devel
%{_includedir}/%{name}
%{_libdir}/%{name}.so
%{_libdir}/%{name}-gobject.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}-gobject.pc
%{_datadir}/gir-1.0/%{girname}-%{girapiversion}.gir
%files doc
%license COPYING
%doc AUTHORS NEWS README
%{_datadir}/gtk-doc/html/%{name}
%changelog
|