diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa1a46e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +wkf-1.3.11.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index a5256fe..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: wkf -# $Id$ -NAME := wkf -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sources b/sources index e69de29..56ba14b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +a48f7744d1fbbcdad45ce877cfc6e0f3 wkf-1.3.11.tar.bz2 diff --git a/wkf-1.3.11-func-declaration.patch b/wkf-1.3.11-func-declaration.patch new file mode 100644 index 0000000..c07beee --- /dev/null +++ b/wkf-1.3.11-func-declaration.patch @@ -0,0 +1,22 @@ +--- wkf-1.3.11/functions.h.debug 2005-04-05 17:26:56.000000000 +0900 ++++ wkf-1.3.11/functions.h 2008-04-03 23:43:07.000000000 +0900 +@@ -56,4 +56,7 @@ + extern void setOutputStringBuffer(String, unsigned int); + extern conv_t convertKanjiCode(kcode_t, kcode_t); + ++/* strlcpy.c */ ++extern size_t strlcpy(char *dst, const char *src, size_t siz); ++ + #endif /* _FUNCTIONS_H */ +--- wkf-1.3.11/wkf.c.debug 2007-07-06 01:35:21.000000000 +0900 ++++ wkf-1.3.11/wkf.c 2008-04-03 23:47:06.000000000 +0900 +@@ -44,6 +44,9 @@ + #include "config.h" + #endif /* HAVE_CONFIG_H */ + ++/* For asprintf */ ++#define _GNU_SOURCE ++ + #include + #include + #ifndef _WIN32 diff --git a/wkf.spec b/wkf.spec new file mode 100644 index 0000000..7209b30 --- /dev/null +++ b/wkf.spec @@ -0,0 +1,116 @@ +Name: wkf +Version: 1.3.11 +Release: 2%{?dist} +Summary: Japanese Kanji code converting filter + +Group: System Environment/Libraries +License: BSD +URL: http://www.mysticwall.com/software/wkf/ +Source0: http://www.mysticwall.com/download/%{name}-%{version}.tar.bz2 +Patch0: wkf-1.3.11-func-declaration.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: groff +Requires: %{name}-libs = %{version}-%{release} + +%description +WKF is a Japanese Kanji code converting filter. + + +%package libs +Summary: Libraries for WKF filter +Group: System Environment/Libraries + +%description libs +WKF is a Japanese Kanji code converting filter. +This package contains shared libraries for WKF. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%setup -q +%patch0 -p1 -b .func_declare + +for f in \ + API \ + HISTORY \ + JAPANESE \ + README \ + wkf.1 + do + iconv -f EUC-JP -t UTF-8 $f > $f.tmp && \ + ( touch -r $f $f.tmp ; %{__mv} -f $f.tmp $f ) || \ + %{__rm} -f $f.tmp +done + +%build +%configure --disable-static +%{__make} %{?_smp_mflags} \ + CC="%{__cc} %{optflags} -Werror-implicit-function-declaration" + + +%install +%{__rm} -rf $RPM_BUILD_ROOT + +# Use %%makeinstall +%makeinstall \ + INSTALL="%{__install} -p" \ + INSTALL_PROGRAM="%{__install} -p" \ + INSTALL_DATA="%{__install} -p -m 0644" \ + RM="%{__rm} -f" + +%{__chmod} 0755 $RPM_BUILD_ROOT%{_libdir}/libwkf*.so.* +find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' \ + -exec %{__rm} -f {} ';' + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%check +%{__make} test + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc README + +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.1* + +%files libs +%defattr(-,root,root,-) +%doc HISTORY +%doc TODO + +%{_libdir}/libwkf*.so.* + +%files devel +%defattr(-,root,root,-) +%doc API + +%{_includedir}/wkf.h +%{_libdir}/libwkf*.so + + +%changelog +* Thu Apr 3 2008 Mamoru Tasaka - 1.3.11-2 +- Fix implicit function declaration + +* Sat Feb 9 2008 Mamoru Tasaka +- Rebuild against gcc43 (F-9) + +* Wed Dec 5 2007 Mamoru Tasaka - 1.3.11-1 +- Initial packaging +