From d8211a96599f83144376bb71fc66692c5cd7dc2c Mon Sep 17 00:00:00 2001 From: Ben Rosser Date: Mon, 31 Oct 2016 22:19:25 -0400 Subject: [PATCH] quasselc: add new package quasselc is a library providing an API to access a Quassel core in pure C. Quassel is a distributed IRC client where the core can run independently of the interface(s). This library provides a C API for programs that wish to implement the Quassel protocol. Signed-off-by: Ben Rosser --- libs/quasselc/Makefile | 64 +++++++++++++++++++ .../patches/001-respect-cflags-ldflags.patch | 18 ++++++ 2 files changed, 82 insertions(+) create mode 100644 libs/quasselc/Makefile create mode 100644 libs/quasselc/patches/001-respect-cflags-ldflags.patch diff --git a/libs/quasselc/Makefile b/libs/quasselc/Makefile new file mode 100644 index 000000000..3f1d014f2 --- /dev/null +++ b/libs/quasselc/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2016 Ben Rosser +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=quasselc + +# quasselc upstream doesn't release versions (at least, at the moment), +# so use commit date for PKG_VERSION and embed commit hash into PKG_RELEASE. +PKG_VERSION:=2015-04-06 +PKG_SOURCE_VERSION:=fcd966966924e3d9af0954db56117e2f48767ea1 +PKG_RELEASE:=1.$(PKG_SOURCE_VERSION) + +PKG_LICENSE:=GPL-3.0+ + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/phhusson/QuasselC +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.bz2 + +PKG_MAINTAINER:=Ben Rosser + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +MAKE_FLAGS += prefix=$(STAGING_DIR)/usr libdir=$(STAGING_DIR)/usr/lib includedir=$(STAGING_DIR)/usr/include +MAKE_INSTALL_FLAGS += prefix=/usr libdir=/usr/lib includedir=/usr/include + +define Package/quasselc + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+glib2 + SUBMENU:=Instant Messaging + URL:=https://github.com/phhusson/QuasselC + TITLE:=API to access a Quassel Core in pure C +endef + +define Package/quasselc/description + An implementation of the Quassel protocol in pure C. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/quasselc + $(CP) $(PKG_INSTALL_DIR)/usr/include/quasselc/* $(1)/usr/include/quasselc/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libquasselc.so* $(1)/usr/lib/ + $(LN) libquasselc.so.0 $(1)/usr/lib/libquasselc.so + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/quasselc.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/quasselc/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libquasselc.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,quasselc)) diff --git a/libs/quasselc/patches/001-respect-cflags-ldflags.patch b/libs/quasselc/patches/001-respect-cflags-ldflags.patch new file mode 100644 index 000000000..7ffbb8052 --- /dev/null +++ b/libs/quasselc/patches/001-respect-cflags-ldflags.patch @@ -0,0 +1,18 @@ +diff --git a/Makefile b/Makefile +index 7994eea..b1f8d83 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,11 +2,11 @@ prefix ?= /usr/local + libdir ?= $(prefix)/lib + includedir ?= $(prefix)/include + +-CFLAGS:=-Wall -g -Wextra $(shell pkg-config glib-2.0 --cflags) -Wswitch-enum -std=gnu11 -O2 -fPIC ++CFLAGS+=-Wall -g -Wextra $(shell pkg-config glib-2.0 --cflags) -Wswitch-enum -std=gnu11 -fPIC + SO_VERSION = 0 + VERSION = 0 + INSTALL = install +-LDLIBS:=$(shell pkg-config glib-2.0 --libs) -lz ++LDLIBS+=$(shell pkg-config glib-2.0 --libs) -lz + + BOTLIBS := -Wl,-rpath,. +