summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Pöchtrager2015-06-13 11:52:51 +0200
committerThomas Pöchtrager2015-06-13 11:52:51 +0200
commitae8427daefee21d0dc6dfd41688a37819ce4fb8c (patch)
treefd839079c550dd4573eb8f9e2dd48a195720ee0b
downloadaur-ae8427daefee21d0dc6dfd41688a37819ce4fb8c.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--Makefile27
-rw-r--r--PKGBUILD69
3 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7f0918b9450e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = mingw-w64-libircclient
+ pkgdesc = Small but powerful library, which implements client-server IRC protocol (mingw-w64)
+ pkgver = 1.8
+ pkgrel = 1
+ url = http://www.ulduzsoft.com/libircclient/
+ arch = any
+ license = LGPL
+ makedepends = mingw-w64-gcc
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-crt
+ options = !libtool
+ options = staticlibs
+ options = !strip
+ options = !buildflags
+ source = http://downloads.sourceforge.net/sourceforge/libircclient/libircclient-1.8.tar.gz
+ source = Makefile
+ sha256sums = 2cf8523ac683588f2785b08159a2df3e4d15939ee655c0024aa86334149de8f6
+ sha256sums = SKIP
+
+pkgname = mingw-w64-libircclient
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..167de88ea215
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+# $Id: Makefile.in 110 2012-02-13 03:07:47Z gyunaev $
+CC = i686-w64-mingw32-gcc
+CFLAGS = -Wall -DIN_BUILDING_LIBIRC -g -O3 -DENABLE_THREADS -D_REENTRANT -DWIN32_DLL
+AR=i686-w64-mingw32-ar cr
+RANLIB=i686-w64-mingw32-ranlib
+INCLUDES=-I../../include
+DESTDIR=
+APIVERSION = 1
+
+OBJS = ../../src/libircclient.o
+
+all: static shared_mingw
+
+static: libircclient.a
+shared_mingw: libircclient.dll
+
+libircclient.dll: $(OBJS)
+ $(CC) -shared -s -o libircclient.dll -Wl,-out-implib,libircclient.dll.a $(OBJS) ../../src/libircclient.def -lkernel32 -lwsock32 -lz -lwsock32 -lgdi32 -lkernel32
+
+libircclient.a: $(OBJS)
+ $(AR) libircclient.a $(OBJS)
+ $(RANLIB) libircclient.a
+
+
+.c.o:
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
+# $Id: Makefile 84 2009-01-10 01:37:29Z chromerium $
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4d5521f7ae3e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,69 @@
+# Maintainer: Thomas Poechtrager <tpoechtrager at g m a i l>
+
+pkgname=mingw-w64-libircclient
+pkgver=1.8
+pkgrel=1
+pkgdesc="Small but powerful library, which implements client-server IRC protocol (mingw-w64)"
+arch=(any)
+url='http://www.ulduzsoft.com/libircclient/'
+license=('LGPL')
+makedepends=(mingw-w64-gcc mingw-w64-configure)
+depends=(mingw-w64-crt)
+options=(!libtool staticlibs !strip !buildflags)
+source=(http://downloads.sourceforge.net/sourceforge/libircclient/libircclient-$pkgver.tar.gz
+ Makefile)
+sha256sums=('2cf8523ac683588f2785b08159a2df3e4d15939ee655c0024aa86334149de8f6'
+ 'SKIP')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}"/libircclient-${pkgver}
+ cp ../Makefile .
+}
+
+build() {
+ cd ${srcdir}/libircclient-${pkgver}
+
+ # Fix some brokenness.
+
+ find . -name '*.c' -o -name '*.h' -exec \
+ sed -i "s/defined (WIN32)/defined (_WIN32)/g" {} \;
+
+ sed -i "s/int nsock/socket_t nsock/g" src/dcc.c
+
+ for _arch in ${_architectures}; do
+ mkdir build-${_arch} && pushd build-${_arch}
+ mkdir src && pushd src
+
+ # libircclient's configure script doesn't like building
+ # outside the root directory, so we must use a custom Makefile.
+ sed -i "s/i686-w64-mingw32/${_arch}/g" ../../Makefile
+ make -f ../../Makefile
+ rm ../../src/libircclient.o
+
+ popd
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/libircclient-${pkgver}/build-${_arch}/src"
+ mkdir -p $pkgdir/usr/${_arch}/bin $pkgdir/usr/${_arch}/lib $pkgdir/usr/${_arch}/include/libircclient
+ cp libircclient.dll $pkgdir/usr/${_arch}/bin
+ cp libircclient.dll.a $pkgdir/usr/${_arch}/lib
+ cp libircclient.a $pkgdir/usr/${_arch}/lib
+
+ # The header files do not really belong into include/libircclient,
+ # but it's what the Arch maintainers are doing, so just follow them.
+ cp ../../include/*.h $pkgdir/usr/${_arch}/include/libircclient
+
+ # Add symlinks so "#include <libircclient.h>" works too.
+ ln -rs $pkgdir/usr/${_arch}/include/libircclient/* $pkgdir/usr/${_arch}/include
+
+ find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' | xargs -rtl1 rm
+ find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip -x
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g
+ done
+}