ipa-gothic-fonts/ipa-gothic-fonts.spec

79 lines
2.1 KiB
RPMSpec

%define fontdir %{_datadir}/fonts/ipa-gothic
%define pkg_version 00302
Name: ipa-gothic-fonts
Version: 003.02
Release: 1mamba
Summary: Japanese Gothic-typeface OpenType font by IPA
Group: System/Fonts
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://ossipedia.ipa.go.jp/ipafont/index.html
Source0: http://info.openlab.ipa.go.jp/ipafont/fontdata/ipag%{pkg_version}.zip
Source1: ipa-gothic-fonts-fontconfig.conf
License: IPA
BuildRequires: fonttools
BuildRequires: mkfontdir
BuildRequires: ttmkfdir
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
IPA Font is a Japanese OpenType fonts that is JIS X 0213:2004
compliant, provided by Information-technology Promotion Agency, Japan.
This package contains Gothic (sans-serif) style font.
%prep
%setup -q -n ipag%{pkg_version}
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{fontdir} %{buildroot}%{_sysconfdir}/fonts/{conf.d,conf.avail}
install -m0644 *.ttf %{buildroot}%{fontdir}
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/fonts/conf.avail/65-3-ipa-gothic.conf
pushd %{buildroot}%{_sysconfdir}/fonts/conf.avail
for f in *.conf; do
ln -s ../conf.avail/$f ../conf.d/$f
done
popd
ttmkfdir -d %{buildroot}%{fontdir} -o %{buildroot}%{fontdir}/fonts.scale
mkfontdir %{buildroot}%{fontdir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
:
%postun
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
fi
:
%files
%defattr(-,root,root)
%{_sysconfdir}/fonts/conf.avail/*-ipa-*.conf
%{_sysconfdir}/fonts/conf.d/*-ipa-*.conf
%dir %{fontdir}
%{fontdir}/*.ttf
%verify(not md5 size mtime) %{fontdir}/fonts.dir
%verify(not md5 size mtime) %{fontdir}/fonts.scale
%doc Readme_*.txt IPA_Font_License_Agreement_v1.0.txt
%changelog
* Mon Feb 21 2011 gil <puntogil@libero.it> 003.02-1mamba
- package created by autospec