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 <rosser.bjr@gmail.com>
This commit is contained in:
Ben Rosser 2016-10-31 22:19:25 -04:00 committed by Yousong Zhou
parent abebd4e756
commit d8211a9659
2 changed files with 82 additions and 0 deletions

64
libs/quasselc/Makefile Normal file
View File

@ -0,0 +1,64 @@
#
# Copyright (C) 2016 Ben Rosser <rosser.bjr@gmail.com>
#
# 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 <rosser.bjr@gmail.com>
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))

View File

@ -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,.