From eefd2e70d970eba2ffaffb518a247f2b1a4245be2190af263b46880786d5ac00 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 4 Jul 2012 06:55:01 +0000 Subject: [PATCH] - package created, added rpm-macros.fonts-config OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/fontpackages?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + COPYING | 30 +++++++++++++++++ fontpackages.changes | 5 +++ fontpackages.spec | 70 ++++++++++++++++++++++++++++++++++++++ rpm-macros.fonts-config | 75 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 204 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 COPYING create mode 100644 fontpackages.changes create mode 100644 fontpackages.spec create mode 100644 rpm-macros.fonts-config diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..438f472 --- /dev/null +++ b/COPYING @@ -0,0 +1,30 @@ +Copyright (c) 2000-2011, Novell, Inc. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +* Neither the name of the Novell nor the names of its contributors may +be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/fontpackages.changes b/fontpackages.changes new file mode 100644 index 0000000..509434d --- /dev/null +++ b/fontpackages.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Tue Jul 3 13:02:24 UTC 2012 - pgajdos@suse.com + +- package created, added rpm-macros.fonts-config + diff --git a/fontpackages.spec b/fontpackages.spec new file mode 100644 index 0000000..3f9f73f --- /dev/null +++ b/fontpackages.spec @@ -0,0 +1,70 @@ +# +# spec file for package fontpackage +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: fontpackages +Version: 1.0 +Release: 0 +License: BSD-3-Clause +Summary: Commons for Font Packages +Group: System/Base +Source0: rpm-macros.fonts-config +Source100: COPYING +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch + +%description +Commons for font packages. + +%package devel +Summary: Development Commons for Font Packages +Group: Development/Tools/Building +Requires: %{name} = %{version} + +%description devel +Development commons for font packages. + +%package runtime +Summary: Runtime Commons for Font Packages +Group: System/Base +Requires: %{name} = %{version} + +%description runtime +Runtime commons for font packages. + + +%prep + +%build +cp %{SOURCE100} . + +%install +mkdir -p %{buildroot}%{_datadir}/fonts/truetype +mkdir -p %{buildroot}%{_sysconfdir}/rpm +cp -a %{SOURCE0} %{buildroot}%{_sysconfdir}/rpm/macros.fonts-config + +%files runtime +%defattr(-,root,root) +%dir %{_datadir}/fonts/truetype + +%files devel +%defattr(-,root,root) +%doc COPYING +%config %{_sysconfdir}/rpm/macros.fonts-config + +%changelog + diff --git a/rpm-macros.fonts-config b/rpm-macros.fonts-config new file mode 100644 index 0000000..9e11513 --- /dev/null +++ b/rpm-macros.fonts-config @@ -0,0 +1,75 @@ +# directories +%_fontsdir %{_usr}/share/fonts +%_ttfontsdir %{_fontsdir}/truetype + +# package build macros +%reconfigure_fonts_prereq \ +Requires(pre): perl aaa_base \ +%nil + +# macro: reconfigure_fonts +# font setup for suse +# options: +# -c (the fonts are CJK fonts, also do setup which is only needed +# for CJK) +%reconfigure_fonts(c) \ + if test -x /usr/sbin/fonts-config ; then \ + LC_ALL=POSIX \ + /usr/sbin/fonts-config --verbose \ + fi \ + %{-c: \ + if test -x /usr/sbin/acroread-cidfont-config ; then \ + /usr/sbin/acroread-cidfont-config \ + fi \ + if test -x /usr/sbin/ghostscript-cjk-config ; then \ + /usr/sbin/ghostscript-cjk-config \ + fi} \ + %nil + +# macro: reconfigure_fonts_post +# now alias to reconfigure_fonts, this can change in the future +# options: +# -c (the fonts are CJK fonts, also do setup which is only needed +# for CJK) +%reconfigure_fonts_post(c) \ + if [ $1 -ne 2 ]; then \ + %reconfigure_fonts c \ + fi \ + %nil + +# macro: reconfigure_fonts_postun +# now alias to reconfigure_fonts, this can change in the future +# options: +# -c (the fonts are CJK fonts, also do setup which is only needed +# for CJK) +%reconfigure_fonts_postun(c) \ + %reconfigure_fonts c \ + %nil + +# macro: reconfigure_fonts_post +# do nothing for now, this can change in the future +# options: +# -c (the fonts are CJK fonts, also do setup which is only needed +# for CJK) +%reconfigure_fonts_posttrans(c) \ + %nil + +# macro: reconfigure_fonts_scriptles +# groups %post, %postun and %posttrans of font packages +# options: +# -c (the fonts are CJK fonts, also do setup which is only needed +# for CJK) +# -n (name of subpackage; when ommited, also no -n parameter +# is passed to %post, %postun and %posttrans) +%reconfigure_fonts_scriptlets(c,n:) \ +%post %{-n:-n %{-n*}} \ +%reconfigure_fonts_post c \ +\ +%postun %{-n:-n %{-n*}} \ +%reconfigure_fonts_postun c \ +\ +%posttrans %{-n:-n %{-n*}} \ +%reconfigure_fonts_posttrans c \ +\ +%nil +