nim b15286
%define spectemplatedir %{_sysconfdir}/rpmdevtools/
nim 93f649
%define ftcgtemplatedir %{_datadir}/fontconfig/templates/
nim b15286
%define rpmmacrodir     %{_sysconfdir}/rpm/
nim b15286
nim b15286
Name:    fontpackages
nim 93f649
Version: 1.15
nim b15286
Release: 1%{?dist}
nim b15286
Summary: Common directory and macro definitions used by font packages
nim b15286
nim b15286
Group:     Development/System
nim b15286
# Mostly means the scriptlets inserted via this package do not change the
nim b15286
# license of the packages they're inserted in
nim b15286
License:   LGPLv3+
nim 93f649
URL:       http://fedoraproject.org/wiki/fontpackages/
nim b15286
Source0:   http://fedorahosted.org/releases/f/o/%{name}/%{name}-%{version}.tar.bz2
nim b15286
BuildArch: noarch
nim b15286
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
nim b15286
nim b15286
%description
nim b15286
This package contains the basic directory layout, spec templates, rpm macros
nim b15286
and other materials used to create font packages.
nim b15286
nim b15286
nim b15286
%package filesystem
nim b15286
Summary: Directories used by font packages
nim b15286
Group:   User Interface/X
nim b15286
License: Public Domain
nim b15286
nim b15286
%description filesystem
nim b15286
This package contains the basic directory layout used by font packages,
nim b15286
including the correct permissions for the directories.
nim b15286
nim b15286
nim b15286
%package devel
nim b15286
Summary: Templates and macros used to create font packages
nim b15286
Group:   User Interface/X
nim b15286
nim b15286
Requires:  rpmdevtools, %{name}-filesystem = %{version}-%{release}
nim b15286
nim b15286
%description devel
nim b15286
This package contains spec templates, rpm macros and other materials used to
nim b15286
create font packages.
nim b15286
nim b15286
nim b15286
%prep
nim b15286
%setup -q
nim b15286
nim b15286
nim b15286
%build
nim b15286
nim b15286
nim b15286
%install
nim b15286
rm -fr %{buildroot}
nim b15286
nim b15286
# Pull macros out of macros.fonts and emulate them during install
nim 93f649
for dir in fontbasedir        fontconfig_masterdir \
nim 93f649
           fontconfig_confdir fontconfig_templatedir ; do
nim b15286
  export _${dir}=$(rpm --eval $(%{__grep} -E "^%_${dir}\b" \
nim b15286
    macros/macros.fonts | %{__awk} '{ print $2 }'))
nim b15286
done
nim b15286
nim b15286
install -m 0755 -d %{buildroot}${_fontbasedir} \
nim 93f649
                   %{buildroot}${_fontconfig_masterdir} \
nim b15286
                   %{buildroot}${_fontconfig_confdir} \
nim b15286
                   %{buildroot}${_fontconfig_templatedir} \
nim b15286
                   %{buildroot}%{spectemplatedir} \
nim 93f649
                   %{buildroot}%{rpmmacrodir} \
nim 93f649
                   %{buildroot}%{_datadir}/fontconfig/templates
nim 93f649
install -m 0644 -p spec-templates/*.spec  %{buildroot}%{spectemplatedir}
nim 93f649
install -m 0644 -p fontconfig-templates/* %{buildroot}%{ftcgtemplatedir}
nim 93f649
install -m 0644 -p macros/macros*         %{buildroot}%{rpmmacrodir}
nim b15286
nim b15286
cat <<EOF > %{name}-%{version}.files
nim b15286
%defattr(0644,root,root,0755)
nim b15286
%dir ${_fontbasedir}
nim 93f649
%dir ${_fontconfig_masterdir}
nim b15286
%dir ${_fontconfig_confdir}
nim b15286
%dir ${_fontconfig_templatedir}
nim b15286
EOF
nim b15286
nim b15286
%clean
nim b15286
rm -fr %{buildroot}
nim b15286
nim b15286
nim b15286
%files filesystem -f %{name}-%{version}.files
nim 93f649
%defattr(0644,root,root,0755)
nim 93f649
%dir %{_datadir}/fontconfig
nim b15286
nim b15286
nim b15286
%files devel
nim b15286
%defattr(0644,root,root,0755)
nim 93f649
%doc license.txt readme.txt
nim b15286
%config(noreplace) %{spectemplatedir}/*.spec
nim b15286
%config(noreplace) %{rpmmacrodir}/macros*
nim 93f649
%dir %{ftcgtemplatedir}
nim 93f649
%{ftcgtemplatedir}/*
nim b15286
nim b15286
nim b15286
%changelog
nim 93f649
* Thu Jan 15 2009 Nicolas Mailhot <nim at fedoraproject dot org>
nim 93f649
- 1.15-1
nim 93f649
➜ lua-ize the main macro
nim 93f649
nim 93f649
* Wed Jan 14 2009 Nicolas Mailhot <nim at fedoraproject dot org>
nim 93f649
- 1.14-1
nim 93f649
➽ Update for subpackage naming changes requested by FPC
nim 93f649
nim 93f649
* Mon Dec 22 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim 93f649
- 1.13-1
nim 93f649
⟃ Add another directory to avoid depending on unowned stuff
nim 93f649
❤ use it to put the fontconfig examples in a better place
nim 93f649
nim 93f649
* Sun Dec 21 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim 93f649
- 1.12-2
nim 93f649
⌂ Change homepage
nim 93f649
nim 93f649
* Fri Dec 19 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim 93f649
- 1.12-1
nim 93f649
☺ Add another macro to allow building fontconfig without cycling
nim 93f649
nim b15286
* Wed Dec 10 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim b15286
- 1.11-1
nim b15286
☺ Add actual fedorahosted references
nim 93f649
nim b15286
* Sun Nov 23 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim b15286
- 1.10-1
nim b15286
☺ renamed to “fontpackages”
nim 93f649
nim b15286
* Fri Nov 14 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim b15286
- 1.9-1
nim b15286
☺ fix and complete fontconfig doc
nim b15286
- 1.8-1
nim b15286
☺ simplify multi spec template: codify general case
nim b15286
- 1.7-1
nim b15286
☺ split fontconfig template documentation is separate files
nim b15286
- 1.6-1
nim b15286
☺ simplify spec templates
nim b15286
- 1.5-1
nim b15286
☺ use ".conf" extension for fontconfig templates
nim b15286
- 1.4-1
nim b15286
☺ small multi spec template fix
nim b15286
nim b15286
* Wed Nov 12 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim b15286
- 1.3-1
nim b15286
☺ remove trailing slashes in directory macros
nim b15286
nim b15286
* Tue Nov 11 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim b15286
- 1.2-1
nim b15286
☺ add fontconfig templates
nim b15286
☺ fix a few typos
nim b15286
nim b15286
* Mon Nov 10 2008 Nicolas Mailhot <nim at fedoraproject dot org>
nim b15286
- 1.0-1
nim b15286
☺ initial release