From b9e5831e0fc2cc36e92f16784b7645402b55939f Mon Sep 17 00:00:00 2001 From: Ben Rosser Date: Mon, 31 Oct 2016 22:22:54 -0400 Subject: [PATCH] quassel-irssi: add new package quassel-irssi is an irssi plugin that allows irssi to connect to Quassel cores. Quassel is a distributed IRC client in which the core can run independently and be connected to by quassel clients over the network. Signed-off-by: Ben Rosser --- net/quassel-irssi/Makefile | 52 +++++++++++++++++++ .../patches/001-respect-cflags.patch | 22 ++++++++ .../patches/002-use-cc-var.patch | 13 +++++ .../003-use-pkgconfig-ldflags-quasselc.patch | 13 +++++ 4 files changed, 100 insertions(+) create mode 100644 net/quassel-irssi/Makefile create mode 100644 net/quassel-irssi/patches/001-respect-cflags.patch create mode 100644 net/quassel-irssi/patches/002-use-cc-var.patch create mode 100644 net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch diff --git a/net/quassel-irssi/Makefile b/net/quassel-irssi/Makefile new file mode 100644 index 000000000..09e593709 --- /dev/null +++ b/net/quassel-irssi/Makefile @@ -0,0 +1,52 @@ +# +# 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:=quassel-irssi + +# quassel-irssi 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:=2016-09-11 +PKG_SOURCE_VERSION:=cbd9bd7f4ac44260d9fcafb809fdf153cde193e5 +PKG_RELEASE:=1.$(PKG_SOURCE_VERSION) + +PKG_LICENSE:=GPL-3.0+ + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/phhusson/quassel-irssi +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_PATH := core +MAKE_VARS += SYSTEM_QUASSELC=1 IRSSI_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" IRSSI_INCLUDE=$(STAGING_DIR)/usr/include/irssi + +define Package/quassel-irssi + SECTION:=net + CATEGORY:=Network + DEPENDS:=+irssi +quasselc + SUBMENU:=Instant Messaging + URL:=https://github.com/phhusson/quassel-irssi + TITLE:=An irssi plugin to connect to quassel core +endef + +define Package/quassel-irssi/description + An irssi plugin that supports connecting to a quassel core. +endef + +define Package/quassel-irssi/install + $(INSTALL_DIR) $(1)/usr/lib/irssi/modules/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/irssi/modules/libquassel_core.so* $(1)/usr/lib/irssi/modules/ +endef + +$(eval $(call BuildPackage,quassel-irssi)) diff --git a/net/quassel-irssi/patches/001-respect-cflags.patch b/net/quassel-irssi/patches/001-respect-cflags.patch new file mode 100644 index 000000000..b9459151b --- /dev/null +++ b/net/quassel-irssi/patches/001-respect-cflags.patch @@ -0,0 +1,22 @@ +diff --git a/core/Makefile b/core/Makefile +index 6133087..389855c 100644 +--- a/core/Makefile ++++ b/core/Makefile +@@ -3,7 +3,7 @@ DESTDIR ?= + LIBDIR ?= /usr/lib + + #IRSSI_INCLUDE:=/home/phh/irssi-0.8.16-rc1.phh/ +-IRSSI_INCLUDE:=/usr/include/irssi/ ++IRSSI_INCLUDE?=/usr/include/irssi/ + IRSSI_LIB?=$(DESTDIR)/$(LIBDIR)/irssi + IRSSI_CFLAGS+=-I$(IRSSI_INCLUDE)/src/ + IRSSI_CFLAGS+=-I$(IRSSI_INCLUDE)/src/core/ +@@ -26,7 +26,7 @@ else + LDFLAGS += -lquasselc + endif + +-CFLAGS=-std=gnu11 -Wall -Wextra -Werror -g -O2 $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations ++CFLAGS+=-std=gnu11 -Wall -Wextra -Werror -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations + + TARGET=libquassel_core.so + diff --git a/net/quassel-irssi/patches/002-use-cc-var.patch b/net/quassel-irssi/patches/002-use-cc-var.patch new file mode 100644 index 000000000..6acb43469 --- /dev/null +++ b/net/quassel-irssi/patches/002-use-cc-var.patch @@ -0,0 +1,13 @@ +diff --git a/core/Makefile b/core/Makefile +index 389855c..2f81417 100644 +--- a/core/Makefile ++++ b/core/Makefile +@@ -44,7 +44,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI_CFLAGS) + quasselc-connector.o: CFLAGS:=$(CFLAGS) + + $(TARGET): $(OBJECTS) +- gcc -shared $^ -o $@ -lz $(LDFLAGS) ++ $(CC) -shared $^ -o $@ -lz $(LDFLAGS) + + install: $(TARGET) + $(INSTALL) -d $(IRSSI_LIB)/modules diff --git a/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch b/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch new file mode 100644 index 000000000..3aef01417 --- /dev/null +++ b/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch @@ -0,0 +1,13 @@ +diff --git a/core/Makefile b/core/Makefile +index 2f81417..aa62201 100644 +--- a/core/Makefile ++++ b/core/Makefile +@@ -23,7 +23,7 @@ ifndef SYSTEM_QUASSELC + QUASSELC_FLAGS:=-Ilib + else + QUASSELC_FLAGS:=$(shell pkg-config --cflags quasselc) +- LDFLAGS += -lquasselc ++ LDFLAGS += $(shell pkg-config --libs quasselc) + endif + + CFLAGS+=-std=gnu11 -Wall -Wextra -Werror -g -O2 $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations