source: spec/trunk/SPECS/fontconfig.spec@ 1036

Last change on this file since 1036 was 904, checked in by Silvan Scherrer, 9 years ago

spec: fontconfig: Release version 2.12.1-2.

File size: 6.3 KB
Line 
1# Note: this .spec is borrowed from git://pkgs.fedoraproject.org/rpms/fontconfig.git
2
3# OS/2 rpm macros don't define this (yet), do it manually:
4%global _fontconfig_masterdir %{_sysconfdir}/fonts
5%global _fontconfig_confdir %{_sysconfdir}/fonts/conf.d
6%global _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail
7
8%global freetype_version 2.1.4
9
10Summary: Font configuration and customization library
11Name: fontconfig
12Version: 2.12.1
13Release: 2%{?dist}
14# src/ftglue.[ch] is in Public Domain
15# src/fccache.c contains Public Domain code
16# fc-case/CaseFolding.txt is in the UCD
17# otherwise MIT
18License: MIT and Public Domain and UCD
19Group: System Environment/Libraries
20#Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2
21URL: http://fontconfig.org
22Vendor: bww bitwise works GmbH
23
24%define svn_url http://svn.netlabs.org/repos/ports/fontconfig/trunk
25%define svn_rev 1839
26
27Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
28
29BuildRequires: gcc make subversion zip
30
31Source1: 30-os2-unsupported.conf
32Source2: 80-os2-tnr-fix.conf
33
34BuildRequires: expat-devel
35BuildRequires: freetype-devel >= %{freetype_version}
36#BuildRequires: fontpackages-devel
37BuildRequires: autoconf automake libtool
38BuildRequires: python python-lxml
39BuildRequires: python-six
40
41#Requires: fontpackages-filesystem
42Requires: freetype
43Requires(pre): freetype
44Requires(post): grep coreutils
45#Requires: font(:lang=en)
46
47# @todo Temporary enforce dependency on the legacy package (that was previously named
48# fontconfig) to have it installed. This should be dropped at some point.
49Requires: fontconfig-legacy
50
51%description
52Fontconfig is designed to locate fonts within the
53system and select them according to requirements specified by
54applications.
55
56%package devel
57Summary: Font configuration and customization library
58Group: Development/Libraries
59Requires: %{name} = %{version}-%{release}
60Requires: freetype-devel >= %{freetype_version}
61Requires: pkgconfig
62
63%description devel
64The fontconfig-devel package includes the header files,
65and developer docs for the fontconfig package.
66
67Install fontconfig-devel if you want to develop programs which
68will use fontconfig.
69
70
71%package devel-doc
72Summary: Development Documentation files for fontconfig library
73Group: Documentation
74BuildArch: noarch
75Requires: %{name}-devel = %{version}-%{release}
76
77%description devel-doc
78The fontconfig-devel-doc package contains the documentation files
79which is useful for developing applications that uses fontconfig.
80
81%debug_package
82
83%prep
84%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
85%setup -q
86%else
87%setup -n "%{name}-%{version}" -Tc
88svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
89rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
90(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
91%endif
92
93# Generate configure and friends
94autoreconf -fvi
95
96%build
97# We don't want to rebuild the docs, but we want to install the included ones.
98export HASDOCBOOK=no
99export CFLAGS="%{optflags}"
100export LDFLAGS="-Zomf -Zhigh-mem"
101export LIBS="-lcx"
102export VENDOR="%{vendor}"
103
104%configure \
105 --with-add-fonts=%{_prefix}/local/share/fonts,%{_datadir}/fonts \
106 --disable-static
107
108make %{?_smp_mflags} V=1
109
110%install
111rm -rf "$RPM_BUILD_ROOT"
112make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
113
114find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
115
116# install OS/2-specific configs and activate them
117install -p -m 0644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_fontconfig_templatedir}/
118ln -s %{_fontconfig_templatedir}/30-os2-unsupported.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/
119ln -s %{_fontconfig_templatedir}/80-os2-tnr-fix.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/
120
121# move installed doc files back to build directory to package them
122# in the right place
123mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* .
124rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/
125
126%check
127# @todo Some tests will fail if there is no working system config (upstream bug)
128if [ -f "%{_fontconfig_masterdir}/fonts.conf" ] ; then
129# this export is needed, as else the dll for the tests are not found
130export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/src/.libs
131#make check
132fi
133
134%post
135
136umask 0022
137
138mkdir -p %{_localstatedir}/cache/fontconfig
139
140# Force regeneration of all fontconfig cache files
141rm -rf %{_localstatedir}/cache/fontconfig/*
142BEGINLIBPATH="$(echo %{_libdir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g');$BEGINLIBPATH" \
143LIBPATHSTRICT=T \
144%{_bindir}/fc-cache -f
145
146%postun
147
148#%transfiletriggerin -- %{_prefix}/local/share/fonts %{_datadir}/fonts
149#%{_bindir}/fc-cache -s
150
151#%transfiletriggerpostun -- %{_prefix}/local/share/fonts %{_datadir}/fonts
152#%{_bindir}/fc-cache -s
153
154%files
155%doc README AUTHORS
156%doc fontconfig-user.txt fontconfig-user.html
157%doc %{_fontconfig_confdir}/README
158%{!?_licensedir:%global license %%doc}
159%license COPYING
160%{_libdir}/fntcnf*.dll
161%{_bindir}/fc-cache.exe
162%{_bindir}/fc-cat.exe
163%{_bindir}/fc-list.exe
164%{_bindir}/fc-match.exe
165%{_bindir}/fc-pattern.exe
166%{_bindir}/fc-query.exe
167%{_bindir}/fc-scan.exe
168%{_bindir}/fc-validate.exe
169%{_fontconfig_templatedir}/*.conf
170%{_datadir}/xml/fontconfig
171# fonts.conf is not supposed to be modified.
172# If you want to do so, you should use local.conf instead.
173%config %{_fontconfig_masterdir}/fonts.conf
174%config(noreplace) %{_fontconfig_confdir}/*.conf
175%dir %{_localstatedir}/cache/fontconfig
176%{_mandir}/man1/*
177%{_mandir}/man5/*
178
179%files devel
180%{_libdir}/fontconfig*.a
181%{_libdir}/pkgconfig/*
182%{_includedir}/fontconfig
183%{_mandir}/man3/*
184
185%files devel-doc
186%doc fontconfig-devel.txt fontconfig-devel
187
188%changelog
189* Fri Nov 25 2016 Silvan Scherrer <silvan.scherrer@aroa.com> 2.12.1-2
190- add buildlevel information to the dll
191
192* Tue Oct 25 2016 Silvan Scherrer <silvan.scherrer@aroa.com> 2.12.1-1
193- Update to version 2.12.1.
194
195* Sat Apr 23 2016 Dmitriy Kuminov <coding@dmik.org> 2.11.95-1
196- Update to version 2.11.95.
197- Fix selecting Type 1 fonts from OS/2 PM font registry.
198- Add aliases for system OS/2 fonts not reconginzed by FreeType
199 (this includes Tms Rmn, Helv and Times New Roman MT 30).
200- Remove trailing space from Times New Roman Type 1 system font.
201- Temporarily disable assertions that sometimes abort Firefox at exit.
202
203* Tue Mar 1 2016 Dmitriy Kuminov <coding@dmik.org> 2.11.94-2
204- Allow loading DLL into high memory.
205
206* Mon Dec 14 2015 Dmitriy Kuminov <coding@dmik.org> 2.11.94-1
207- Initial package for version 2.11.94.
Note: See TracBrowser for help on using the repository browser.