From 4bdef9c918eeae156721e446bd6e164d5f24cbfe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 10 Jan 2014 14:45:13 +0100 Subject: libircclient: import from rawhide --- libircclient-1.6-install.patch | 30 +++++++++++++++ libircclient-1.6-rfc.patch | 11 ++++++ libircclient-1.6-shared.patch | 55 +++++++++++++++++++++++++++ libircclient.spec | 85 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 181 insertions(+) create mode 100644 libircclient-1.6-install.patch create mode 100644 libircclient-1.6-rfc.patch create mode 100644 libircclient-1.6-shared.patch create mode 100644 libircclient.spec diff --git a/libircclient-1.6-install.patch b/libircclient-1.6-install.patch new file mode 100644 index 0000000..73c410c --- /dev/null +++ b/libircclient-1.6-install.patch @@ -0,0 +1,30 @@ +diff -up libircclient-1.6/src/Makefile.in.orig libircclient-1.6/src/Makefile.in +--- libircclient-1.6/src/Makefile.in.orig 2012-04-28 16:32:56.176139347 -0300 ++++ libircclient-1.6/src/Makefile.in 2012-04-28 16:36:10.406147192 -0300 +@@ -14,16 +14,16 @@ static: libircclient.a + shared: libircclient.so + shared_mingw: libircclient.dll + +-install: lib +- -mkdir -p $(DESTDIR)@prefix@/include +- -mkdir -p $(DESTDIR)@prefix@/lib +- cp ../include/libircclient.h $(DESTDIR)@prefix@/include/libircclient.h +- cp ../include/libirc_errors.h $(DESTDIR)@prefix@/include/libirc_errors.h +- cp ../include/libirc_events.h $(DESTDIR)@prefix@/include/libirc_events.h +- cp ../include/libirc_options.h $(DESTDIR)@prefix@/include/libirc_options.h +- cp ../include/libirc_rfcnumeric.h $(DESTDIR)@prefix@/include/libirc_rfcnumeric.h +- cp libircclient.so $(DESTDIR)@prefix@/lib/ +- cp libircclient.a $(DESTDIR)@prefix@/lib/ ++install: @TARGET@ ++ -mkdir -p $(DESTDIR)@includedir@ ++ -mkdir -p $(DESTDIR)@libdir@ ++ cp ../include/libircclient.h $(DESTDIR)@includedir@/libircclient.h ++ cp ../include/libirc_errors.h $(DESTDIR)@includedir@/libirc_errors.h ++ cp ../include/libirc_events.h $(DESTDIR)@includedir@/libirc_events.h ++ cp ../include/libirc_options.h $(DESTDIR)@includedir@/libirc_options.h ++ cp ../include/libirc_rfcnumeric.h $(DESTDIR)@includedir@/libirc_rfcnumeric.h ++ if [ -f libircclient.so ]; then cp libircclient.so $(DESTDIR)@libdir@; else :; fi ++ if [ -f libircclient.a ]; then cp libircclient.a $(DESTDIR)@libdir@; else :; fi + + libircclient.so: libircclient.o + $(CC) -shared -s -o libircclient.so libircclient.o @LIBS@ diff --git a/libircclient-1.6-rfc.patch b/libircclient-1.6-rfc.patch new file mode 100644 index 0000000..3bd6022 --- /dev/null +++ b/libircclient-1.6-rfc.patch @@ -0,0 +1,11 @@ +diff -up libircclient-1.6/include/libircclient.h.orig libircclient-1.6/include/libircclient.h +--- libircclient-1.6/include/libircclient.h.orig 2012-04-28 17:28:29.352267217 -0300 ++++ libircclient-1.6/include/libircclient.h 2012-04-28 17:28:50.662268034 -0300 +@@ -131,6 +131,7 @@ typedef void (*irc_dcc_callback_t) (irc_ + #include "libirc_errors.h" + #include "libirc_events.h" + #include "libirc_options.h" ++#include "libirc_rfcnumeric.h" + #undef IN_INCLUDE_LIBIRC_H + + diff --git a/libircclient-1.6-shared.patch b/libircclient-1.6-shared.patch new file mode 100644 index 0000000..15d1e39 --- /dev/null +++ b/libircclient-1.6-shared.patch @@ -0,0 +1,55 @@ +diff -up libircclient-1.6/src/Makefile.in.orig libircclient-1.6/src/Makefile.in +--- libircclient-1.6/src/Makefile.in.orig 2012-05-01 16:29:17.976661058 -0300 ++++ libircclient-1.6/src/Makefile.in 2012-05-01 16:30:00.726662877 -0300 +@@ -5,13 +5,14 @@ AR=@AR@ cr + RANLIB=@RANLIB@ + INCLUDES=-I../include + DESTDIR= ++MAJOR=0 + + OBJS = libircclient.o + + all: @TARGET@ + + static: libircclient.a +-shared: libircclient.so ++shared: libircclient.so.$(MAJOR) + shared_mingw: libircclient.dll + + install: @TARGET@ +@@ -22,11 +23,21 @@ install: @TARGET@ + cp ../include/libirc_events.h $(DESTDIR)@includedir@/libirc_events.h + cp ../include/libirc_options.h $(DESTDIR)@includedir@/libirc_options.h + cp ../include/libirc_rfcnumeric.h $(DESTDIR)@includedir@/libirc_rfcnumeric.h +- if [ -f libircclient.so ]; then cp libircclient.so $(DESTDIR)@libdir@; else :; fi +- if [ -f libircclient.a ]; then cp libircclient.a $(DESTDIR)@libdir@; else :; fi +- +-libircclient.so: libircclient.o +- $(CC) -shared -s -o libircclient.so libircclient.o @LIBS@ ++ if [ -f libircclient.so.$(MAJOR) ]; then \ ++ cp libircclient.so.$(MAJOR) $(DESTDIR)@libdir@; \ ++ ln -s libircclient.so.$(MAJOR) $(DESTDIR)@libdir@/libircclient.so; \ ++ else \ ++ :; \ ++ fi ++ if [ -f libircclient.a ]; then \ ++ cp libircclient.a $(DESTDIR)@libdir@; \ ++ else \ ++ :; \ ++ fi ++ ++libircclient.so.$(MAJOR): libircclient.o ++ $(CC) -shared -o libircclient.so.$(MAJOR) -Wl,-soname=libircclient.so.$(MAJOR) libircclient.o @LIBS@ ++ ln -s libircclient.so.$(MAJOR) libircclient.so + + libircclient.dll: libircclient.o + $(CC) -shared -s -o libircclient.dll -Wl,-out-implib,libircclient.lib libircclient.o libircclient.def -lkernel32 -lwsock32 @LIBS@ +@@ -36,7 +47,7 @@ libircclient.a: libircclient.o + $(RANLIB) libircclient.a + + clean: +- rm -f libircclient.a libircclient.o ++ rm -f libircclient.so* libircclient.a libircclient.o + + distclean: clean + -rm -f Makefile diff --git a/libircclient.spec b/libircclient.spec new file mode 100644 index 0000000..8427ab6 --- /dev/null +++ b/libircclient.spec @@ -0,0 +1,85 @@ +%define major 0 + +Name: libircclient +Summary: C library to create IRC clients +Version: 1.6 +Release: 6%{?dist} +License: LGPLv3+ +Group: Development/Libraries +URL: http://www.ulduzsoft.com/libircclient/ +Source0: http://downloads.sourceforge.net/libircclient/%{name}-%{version}.tar.gz +BuildRequires: openssl-devel +# Correct install target to use includedir and libdir +Patch0: libircclient-1.6-install.patch +# Add rfc include to main header to avoid build failures of packages using it +# example: error: 'LIBIRC_RFC_RPL_ENDOFNAMES' was not declared in this scope +Patch1: libircclient-1.6-rfc.patch +# Create a dynamic library by default. Upstream report about patches: +# https://sourceforge.net/tracker/?func=detail&aid=3522604&group_id=118640&atid=681658 +Patch2: libircclient-1.6-shared.patch + +%description +libircclient is a small but extremely powerful library which implements +the IRC protocol. It is designed to be small, fast, portable and compatible +with the RFC standards as well as non-standard but popular features. +It is perfect for building the IRC clients and bots. + +%package devel +Summary: Development files for libircclient +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains development files for libircclient. + +%prep +%setup -q +rm -rvf cocoa +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%build +%configure --enable-shared --enable-openssl --enable-ipv6 +make %{?_smp_mflags} + +%install +make install DESTDIR=${RPM_BUILD_ROOT} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc Changelog +%doc LICENSE +%doc THANKS +%{_libdir}/*.so.%{major} + +%files devel +%defattr(-,root,root,-) +%doc doc/html/* +%doc doc/rfc1459.txt +%{_libdir}/libircclient.so +%{_includedir}/libirc*.h + +%changelog +* Sat Aug 03 2013 Fedora Release Engineering - 1.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 1.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 5 2012 pcpa - 1.6-3 +- Add Changelog, LICENSE, and THANKS files to main package. + +* Fri May 4 2012 pcpa - 1.6-2 +- Add patch to create a shared library. +- Add documentation to devel package. + +* Sat Apr 28 2012 pcpa - 1.6-1 +- Initial libircclient spec. -- cgit