Browse Source

updated OpenType-mikachan-vl.spec

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@4192 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 12 years ago
parent
commit
65a8d019a3
1 changed files with 38 additions and 5 deletions
  1. 38 5
      O/OpenType-mikachan/OpenType-mikachan-vl.spec

+ 38 - 5
O/OpenType-mikachan/OpenType-mikachan-vl.spec

@@ -1,25 +1,29 @@
-%define _fontdir %{_datadir}/fonts/OpenType-mikachan
+%define _fontdir %{_datadir}/fonts/%{name}
 
 Summary:	Free Japanese Handwriting OpenType Font (mikachan_o)
 Summary(ja):	フリーの手書き風日本語 OpenType フォント (みかちゃん_o)
 Name:		OpenType-mikachan
 Version:	9.1
-Release:	2%{?_dist_release}
+Release:	3%{?_dist_release}
 URL:		http://mikachan-font.com/
 License:	distributable
 Group:		User Interface/X
 BuildArch:	noarch
 Buildroot:	%{_tmppath}/%{name}-%{version}-root
 BuildRequires:	lha
-Provides:	mikachanfont
 Requires(post):   xorg-x11-font-utils
 Requires(postun): xorg-x11-font-utils
 
+## Ver9.1 2005.02.12
+## see chksrc() in %%prep
 Source0:	http://mikachan.sourceforge.jp/mikachan_o.lzh
 Source1:	http://mikachan.sourceforge.jp/mikachanP_o.lzh
 Source2:	http://mikachan.sourceforge.jp/mikachanPB_o.lzh
 Source3:	http://mikachan.sourceforge.jp/mikachanPS_o.lzh
 
+## vine
+Source10:	README.vine
+
 Distribution:	Vine Linux
 Vendor:		Project Vine
 
@@ -59,6 +63,24 @@ It is possible to display following characters.
  - 漢字 (教育/常用/人名/JIS第1水準/JIS第2水準/IBM拡張)
 
 %prep
+## check sha1sum of sources
+## For any mikachan*.lzh archives, 
+## its filename has no versioning informations. 
+chksrc(){
+    cd %_sourcedir
+#ad1b8d96e20f398661a18e4ba7704881705e1e21  mikachanPB_o.lzh
+    sha1sum -c --quiet - <<EOT
+ad1b8d96e20f398661a18e4ba7704881705e1e21  mikachanPB_o.lzh
+cca9a25cbff69fbdd1f03c7c07dae17f9bc183f0  mikachanPS_o.lzh
+da5f64708e108fe97f989587abe7153a488651d0  mikachanP_o.lzh
+3896763b947fd4f5510fb3348435efce15879db6  mikachan_o.lzh
+EOT
+    [ $? -eq 1 ] && return 1
+    cd -
+    return 0
+}
+chksrc || exit 1
+
 %setup -n %{name}-%{version} -c -T
 
 if `%{_bindir}/lha l --archive-kanji-code=sjis %{SOURCE0} > /dev/null 2>&1`
@@ -80,6 +102,9 @@ for i in *.otf ; do
 		| %__sed -e 's/みかちゃん/mikachan/'`
 done
 
+## copy README.vine
+%__cp %{SOURCE10} .
+
 %build
 
 %install
@@ -88,19 +113,27 @@ done
 %__install -m644 -p *.otf %{buildroot}%{_fontdir}
 
 %post
-( umask 133 ; %{_bindir}/fc-cache %{_fontdir} ) ||:
+%__font_install_post %{_fontdir}
 
 %postun
-( umask 133 ; %{_bindir}/fc-cache %{_fontdir} ) ||:
+%__font_install_postun %{_fontdir}
 
 %clean
 %__rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root)
+%doc README.vine
 %{_fontdir}/*
 
 %changelog
+* Wed Jun 2 2011 Munehiro Yamamoto <munepi@vinelinux.org> 9.1-3
+- added README.vine
+- drooped Provides: mikachanfont
+- checked sha1sum of sources
+  - defined chksrc() in %%prep
+- use %%__font_install_post, %%__font_install_postun
+
 * Sat Jun 20 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 9.1-2vl5
 - changed font path