[kiten] stripped source to remove skip codes from kanjidic, bz969411
Tom Callaway
spot at fedoraproject.org
Tue Feb 25 17:14:23 UTC 2014
commit 1ab77d756f84e8f6b608f3bc33e3fddbc9fadf81
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Feb 25 12:15:10 2014 -0500
stripped source to remove skip codes from kanjidic, bz969411
.gitignore | 1 +
kiten.spec | 12 ++++++++++--
sources | 2 +-
strip.sh | 33 +++++++++++++++++++++++++++++++++
4 files changed, 45 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7af4c56..5e13f6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
/kiten-4.12.0.tar.xz
/kiten-4.12.1.tar.xz
/kiten-4.12.2.tar.xz
+/kiten-stripped-4.12.2.tar.xz
diff --git a/kiten.spec b/kiten.spec
index 39d058f..837eacd 100644
--- a/kiten.spec
+++ b/kiten.spec
@@ -1,7 +1,7 @@
Name: kiten
Summary: Japanese Reference/Study Tool
Version: 4.12.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
URL: https://projects.kde.org/projects/kde/kdeedu/%{name}
@@ -11,7 +11,12 @@ URL: https://projects.kde.org/projects/kde/kdeedu/%{name}
%else
%global stable stable
%endif
-Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
+# We have to strip the skip codes out of kanjidic
+# stripped tarball is generated as follows:
+# $ wget http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
+# $ ./strip.sh %{name}-%{version}.tar.xz
+Source0: %{name}-stripped-%{version}.tar.xz
+Source1: strip.sh
## upstream patches
@@ -113,6 +118,9 @@ fi
%changelog
+* Tue Feb 25 2014 Tom Callaway <spot at fedoraproject.org> - 4.12.2-2
+- strip the skip codes out of kanjidic (bz969411)
+
* Fri Jan 31 2014 Rex Dieter <rdieter at fedoraproject.org> - 4.12.2-1
- 4.12.2
diff --git a/sources b/sources
index 41cd039..714dbdf 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3288d3dda135b66774a6da3104d0478a kiten-4.12.2.tar.xz
+0ab4715446bf299231a50140716fbfa1 kiten-stripped-4.12.2.tar.xz
diff --git a/strip.sh b/strip.sh
new file mode 100755
index 0000000..06db058
--- /dev/null
+++ b/strip.sh
@@ -0,0 +1,33 @@
+#!/bin/sh -x
+
+pkgname=kiten
+litepkgname=kiten-stripped
+
+if test "x$1" = x; then
+ echo "help: $0 <kiten tar ball>"
+ exit 1
+fi
+
+#compute file/path name
+tarfile=$1
+expandpath=${tarfile%.tar.xz}
+newtarfile="$litepkgname${tarfile#$pkgname}"
+
+#prepare tmp directory
+rm -f $newtarfile
+mkdir ./tmp
+
+pushd "./tmp"
+ tar xf ../$tarfile
+
+ pushd "$expandpath/data"
+ # remove the skip code from kanjidic
+ sed -i 's/ P[0-9]*-[0-9]*-[0-9]*//g' kanjidic
+ popd
+
+ tar Jcf ${newtarfile} $expandpath
+ rm -r $expandpath
+popd
+
+mv ./tmp/$newtarfile .
+rmdir ./tmp
More information about the scm-commits
mailing list