rpms/samyak-fonts/devel samyak-fonts.spec,1.1,1.2
Pravin Satpute
pravins at fedoraproject.org
Fri Feb 8 05:51:46 UTC 2008
Author: pravins
Update of /cvs/pkgs/rpms/samyak-fonts/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12563
Modified Files:
samyak-fonts.spec
Log Message:
* Fri Feb 08 2008 Pravin Satpute <psatpute at redhat.com> - 1.1.0-2
- added sub packaging support in spec file based on lohit-fonts.spec file
Index: samyak-fonts.spec
===================================================================
RCS file: /cvs/pkgs/rpms/samyak-fonts/devel/samyak-fonts.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- samyak-fonts.spec 21 Jan 2008 09:30:58 -0000 1.1
+++ samyak-fonts.spec 8 Feb 2008 05:51:09 -0000 1.2
@@ -1,60 +1,77 @@
-%define fontname samyak
-%define fontdir %{_datadir}/fonts/%{fontname}
+%define xfontdir %{_datadir}/fonts
+%define langlist "devanagari gujarati tamil malayalam oriya"
+
+Name: samyak-fonts
+Version: 1.1.0
+Release: 2%{?dist}
+Summary: Free Indian truetype/opentype fonts
+Group: User Interface/X
+License: GPLv2
+URL: https://sarovar.org/projects/samyak/
+Source: samyak-fonts-%{version}.tar.gz
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Name: %{fontname}-fonts
-Version: 1.1.0
-Release: 1%{?dist}
-License: GPLv2
-Source: %{fontname}-fonts-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-BuildRequires : dos2unix
-Group: User Interface/X
-Summary: Samyak Font for Indic Script
-URL: https://sarovar.org/projects/samyak/
-
%description
The Samyak package contains fonts for the display of
Scripts Devanagari, Gujarati, Malayalam, Oriya and Tamil
+# mk_pkg <name> <lang-code>
+%define mk_pkg() \
+%package -n samyak-fonts-%1\
+Summary: Free %(echo %1 | sed -e "s/\\(.*\\)/\\u\\1/") font\
+Group: User Interface/X \
+Provides: ttfonts-%2 = 1.8-2\
+Obsoletes : ttfonts-%2 <= 1.8-1\
+\
+\
+%description -n samyak-fonts-%1\
+This package provides a free %(echo %1 | sed -e "s/\\(.*\\)/\\u\\1/") truetype/opentype font.\
+\
+%files -n samyak-fonts-%1\
+%defattr(-, root, root, -)\
+%dir %{xfontdir}/samyak-%1\
+%{xfontdir}/samyak-%1/*.ttf\
+\
+%post -n samyak-fonts-%1 \
+if [ -x %{_bindir}/fc-cache ]; then \
+ %{_bindir}/fc-cache %{xfontdir} \
+fi \
+\
+%postun -n samyak-fonts-%1 \
+if [ "$1" = "0" ]; then \
+ if [ -x %{_bindir}/fc-cache ]; then \
+ %{_bindir}/fc-cache %{xfontdir} \
+ fi \
+fi
+
+%mk_pkg gujarati gu
+%mk_pkg devanagari hi
+%mk_pkg malayalam ml
+%mk_pkg oriya or
+%mk_pkg tamil ta
+
%prep
-%setup -q
-find . -not -name \*.ttf -type f -exec dos2unix -k {} \;
+%setup -q -n samyak-fonts-%{version}
%build
echo "Nothing to do in Build."
%install
-rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
-install -m 0755 -d %{buildroot}%{fontdir}
-install -m 0644 -p devanagari/*.ttf %{buildroot}%{fontdir}
-install -m 0644 -p malayalam/*.ttf %{buildroot}%{fontdir}
-install -m 0644 -p oriya/*.ttf %{buildroot}%{fontdir}
-install -m 0644 -p tamil/*.ttf %{buildroot}%{fontdir}
-install -m 0644 -p gujarati/*.ttf %{buildroot}%{fontdir}
+for i in "%{langlist}"
+do
+ install -d $RPM_BUILD_ROOT/%{xfontdir}/samyak-$i
+ install -m 0644 $i/* $RPM_BUILD_ROOT/%{xfontdir}/samyak-$i
+done
%clean
-rm -rf %{buildroot}
-
-%post
-if [ -x %{_bindir}/fc-cache ]; then
- %{_bindir}/fc-cache %{fontdir} || :
-fi
-
-%postun
-if [ "$1" = "0" ]; then
- if [ -x %{_bindir}/fc-cache ]; then
- %{_bindir}/fc-cache %{fontdir} || :
- fi
-fi
-
-%files
-%defattr(-,root,root,-)
-%dir %{fontdir}
-%{fontdir}/*.ttf
-
+rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Feb 08 2008 Pravin Satpute <psatpute at redhat.com> - 1.1.0-2
+- added sub packaging support in spec file based on lohit-fonts.spec file
+
* Fri Jan 18 2008 Pravin Satpute <psatpute at redhat.com> - 1.1.0-1
- initial packaging
More information about the fonts-bugs
mailing list