commit d6ffe3a03353caac34707dad6c6f3a8a46fa71ca
Author: Jakub Bogusz <[email protected]>
Date:   Fri Jun 23 18:37:38 2017 +0200

    - initial
    - dirs patch allows to specify arch-dependent libdir
    - xchat-gtk2 switches xchat plugin to use glib 2.x headers (instead of 1.x)

 zh-autoconvert-dirs.patch       |  37 +++++++++++++
 zh-autoconvert-xchat-gtk2.patch |  13 +++++
 zh-autoconvert.spec             | 118 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 168 insertions(+)
---
diff --git a/zh-autoconvert.spec b/zh-autoconvert.spec
new file mode 100644
index 0000000..99f22c6
--- /dev/null
+++ b/zh-autoconvert.spec
@@ -0,0 +1,118 @@
+Summary:       Chinese HZ/GB/BIG5/UTF-16/UTF-7/UTF-8 encodings auto-converter
+Summary(pl.UTF-8):     Automatyczny konwerter kodowań chińskich znaków 
HZ/GB/BIG5/UTF-16/UTF-7/UTF-8
+Name:          zh-autoconvert
+Version:       0.3.16
+Release:       1
+License:       GPL v2+
+Group:         Applications/Text
+Source0:       
http://ftp.debian.org/debian/pool/main/z/zh-autoconvert/%{name}_%{version}.orig.tar.gz
+# Source0-md5: 1f4aa2332afc076910b5d510b8c81966
+Patch0:                %{name}-dirs.patch
+Patch1:                %{name}-xchat-gtk2.patch
+BuildRequires: glib2-devel >= 2.0
+BuildRequires: pkgconfig
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+AutoConvert is an intelligent Chinese Encoding converter. It uses
+builtin functions to judge the type of the input file's Chinese
+Encoding (such as GB/Big5/HZ), then converts the input file to any
+type of Chinese Encoding you want. You can use autoconvert to handle
+incoming mail, automatically converting messages to the Chinese
+Encoding you want. It can alse handle Unicode (UTF-16)/UTF-7/UTF-8
+now.
+
+%description -l pl.UTF-8
+AutoConvert to inteligentny konwerter kodowania znaków chińskich.
+Używa wbudowanych funkcji do rozpoznawania w pliku wejściowym typu
+kodowania znaków chińskich (takiego jak GB/Big5/HZ), a następnie
+konwertuje plik do dowolnie wybranego kodowania. Pakietu można używać
+do obsługi poczty przychodzącej, aby automatycznie konwertować
+wiadomości. Potrafi też obsługiwać kodowania unikodowe
+(UTF-16/UTF-7/UTF-8).
+
+%package devel
+Summary:       Header files for libhz library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libhz
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for libhz library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libhz.
+
+%package static
+Summary:       Static libhz library
+Summary(pl.UTF-8):     Statyczna biblioteka libhz
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static libhz library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libhz.
+
+%package -n xchat-zh-autoconvert
+Summary:       zh-autoconvert plugins for XChat IRC client
+Summary(pl.UTF-8):     Wtyczki zh-autoconvert dla klienta IRC-a XChat
+Group:         X11/Applications/Networking
+Requires:      %{name} = %{version}-%{release}
+Requires:      xchat >= 2
+
+%description -n xchat-zh-autoconvert
+zh-autoconvert plugins for XChat IRC client.
+
+%description -n xchat-zh-autoconvert -l pl.UTF-8
+Wtyczki zh-autoconvert dla klienta IRC-a XChat.
+
+%prep
+%setup -q -n autoconvert-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__make} -j1 \
+       CC="%{__cc}" \
+       CFLAG="%{rpmcflags} -Wall -Iinclude" \
+       CFLAGS="%{rpmcflags} -Wall -I../include" \
+       LDFLAGS="%{rpmldflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/xchat/plugins,%{_includedir}}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       LIBDIR=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog LICENSE Readme TODO Thanks
+%attr(755,root,root) %{_bindir}/autob5
+%attr(755,root,root) %{_bindir}/autogb
+%attr(755,root,root) %{_libdir}/libhz.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhz.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhz.so
+%{_includedir}/hz.h
+%{_includedir}/zhstatis.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libhz.a
+
+%files -n xchat-zh-autoconvert
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/xchat/plugins/xchat-autob5.so
+%attr(755,root,root) %{_libdir}/xchat/plugins/xchat-autogb.so
diff --git a/zh-autoconvert-dirs.patch b/zh-autoconvert-dirs.patch
new file mode 100644
index 0000000..9d33072
--- /dev/null
+++ b/zh-autoconvert-dirs.patch
@@ -0,0 +1,37 @@
+--- autoconvert-0.3.16/Makefile.orig   2001-04-28 03:45:46.000000000 +0200
++++ autoconvert-0.3.16/Makefile        2017-06-23 17:00:19.390205787 +0200
+@@ -3,6 +3,12 @@
+ CFLAG=-O2 -g -Wall -Iinclude
+ LIBS= -Llib -lhz
+ 
++PREFIX=/usr
++BINDIR=$(PREFIX)/bin
++LIBDIR=$(PREFIX)/lib
++INCLUDEDIR=$(PREFIX)/include
++XCHATDIR=$(LIBDIR)/xchat/plugins
++
+ .PHONY: all hzlib clean install-home install
+ 
+ all: autob5 autogb hzlib  xchat-plugins
+@@ -30,12 +36,12 @@
+       ln -s $(HOME)/bin/autogb $(HOME)/bin/autob5
+       chmod 755 $(HOME)/bin/autogb 
+ install:
+-      install -m 755 autogb $(DESTDIR)/usr/bin
+-      install -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
+-      cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0.0 libhz.so.0
+-      cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0 libhz.so
+-      install -m 755 lib/libhz.a $(DESTDIR)/usr/lib
+-      install -m 755 contrib/xchat-plugins/xchat-autogb.so 
$(DESTDIR)/usr/share/zh-autoconvert
+-      install -m 755 contrib/xchat-plugins/xchat-autob5.so 
$(DESTDIR)/usr/share/zh-autoconvert
+-      install -m 644 include/*.h  $(DESTDIR)/usr/include
+-      ln -s autogb $(DESTDIR)/usr/bin/autob5
++      install -m 755 autogb $(DESTDIR)$(BINDIR)
++      install -m 755 lib/libhz.so.0.0 $(DESTDIR)$(LIBDIR)
++      cd $(DESTDIR)$(LIBDIR);ln -s  libhz.so.0.0 libhz.so.0
++      cd $(DESTDIR)$(LIBDIR);ln -s  libhz.so.0 libhz.so
++      install -m 755 lib/libhz.a $(DESTDIR)$(LIBDIR)
++      install -m 755 contrib/xchat-plugins/xchat-autogb.so 
$(DESTDIR)$(XCHATDIR)
++      install -m 755 contrib/xchat-plugins/xchat-autob5.so 
$(DESTDIR)$(XCHATDIR)
++      install -m 644 include/*.h  $(DESTDIR)$(INCLUDEDIR)
++      ln -s autogb $(DESTDIR)$(BINDIR)/autob5
diff --git a/zh-autoconvert-xchat-gtk2.patch b/zh-autoconvert-xchat-gtk2.patch
new file mode 100644
index 0000000..0dc7934
--- /dev/null
+++ b/zh-autoconvert-xchat-gtk2.patch
@@ -0,0 +1,13 @@
+--- autoconvert-0.3.16/contrib/xchat-plugins/Makefile.orig     2001-02-18 
14:19:31.000000000 +0100
++++ autoconvert-0.3.16/contrib/xchat-plugins/Makefile  2017-06-23 
16:05:36.573576608 +0200
+@@ -5,8 +5,8 @@
+ 
+ all:xchat-autogb.so xchat-autob5.so
+ xchat-autogb.so:      xchat-autogb.c
+-      $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared 
-Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `gtk-config --cflags`
++      $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared 
-Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `pkg-config --cflags glib-2.0`
+ xchat-autob5.so:      xchat-autob5.c
+-      $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared 
-Wl,-soname,xchat-autob5.so -o $@ $< -lhz  -lc `gtk-config --cflags`
++      $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared 
-Wl,-soname,xchat-autob5.so -o $@ $< -lhz  -lc `pkg-config --cflags glib-2.0`
+ clean:
+       rm -rf *~ xchat-autogb.so xchat-autob5.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zh-autoconvert.git/commitdiff/d6ffe3a03353caac34707dad6c6f3a8a46fa71ca

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to