update spec

This commit is contained in:
Peng Wu 2013-03-01 17:48:33 +08:00
parent bb6ddd8808
commit 38e71ea03c
2 changed files with 6 additions and 53 deletions

View File

@ -1,47 +0,0 @@
From 1b52b36dde0fda71df328ea874431b2c4f424e04 Mon Sep 17 00:00:00 2001
From: Peng Wu <alexepico@gmail.com>
Date: Thu, 28 Feb 2013 12:32:46 +0800
Subject: [PATCH] fixes check_format
---
src/pinyin.cpp | 10 ++++++++++
src/pinyin.h | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index e523119..4ad42a0 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -90,6 +90,16 @@ static bool check_format(const char * userdir){
}
filename = g_build_filename
+ (userdir, "user_pinyin_index.bin", NULL);
+ unlink(filename);
+ g_free(filename);
+
+ filename = g_build_filename
+ (userdir, "user_phrase_index.bin", NULL);
+ unlink(filename);
+ g_free(filename);
+
+ filename = g_build_filename
(userdir, "user.db", NULL);
unlink(filename);
g_free(filename);
diff --git a/src/pinyin.h b/src/pinyin.h
index 2f8a8db..0f57462 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -506,7 +506,7 @@ typedef ChewingKeyVector PinyinKeyVector;
typedef ChewingKeyRestVector PinyinKeyPosVector;
-#define LIBPINYIN_FORMAT_VERSION "0.8.0"
+#define LIBPINYIN_FORMAT_VERSION "0.8.1"
};
--
1.8.1.2

View File

@ -1,19 +1,19 @@
%global snapshot 1
%global snapshot 0
Name: libpinyin
Version: 0.8.1
Version: 0.8.91
Release: 1%{?dist}
Summary: Library to deal with pinyin
License: GPLv2+
URL: https://github.com/libpinyin/libpinyin
Source0: https://github.com/downloads/libpinyin/libpinyin/%{name}-%{version}.tar.gz
Source0: http://downloads.sourceforge.net/libpinyin/libpinyin/%{name}-%{version}.tar.gz
%if %snapshot
Patch0: libpinyin-0.8.x-head.patch
%endif
BuildRequires: libdb-devel, glib2-devel
Requires: %{name}-data = %{version}-%{release}
Requires: %{name}-data%{?_isa} = %{version}-%{release}
%description
The libpinyin project aims to provide the algorithms core
@ -72,7 +72,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%files
%doc AUTHORS COPYING README
%{_libdir}/*.so.*
%dir %{_datadir}/libpinyin
%dir %{_libdir}/libpinyin
%files devel
%doc
@ -83,7 +83,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%files data
%doc
%{_datadir}/libpinyin/data
%{_libdir}/libpinyin/data
%files tools
%{_bindir}/gen_binary_files