Packaging

v1
Tony Olagbaiye 7 years ago
parent 601209ae81
commit 95261b2fc4

2
.gitignore vendored

@ -1,4 +1,6 @@
# Prerequisites # Prerequisites
debian/weechat-slack/
.debhelper/
compile_commands.json compile_commands.json
cscope* cscope*
.depend .depend

@ -1,14 +1,18 @@
CC=clang
CXX=g++
RM=rm -f
ifdef DEBUG ifdef DEBUG
SANCFLAGS=-fsanitize=address -fsanitize=leak CC=clang
SANLDFLAGS=-static-libasan -static-liblsan CXX=g++
DBGCFLAGS=-fsanitize=address -fsanitize=leak
DBGLDFLAGS=-static-libasan -static-liblsan
endif endif
CFLAGS=$(SANCFLAGS) -fno-omit-frame-pointer -fPIC -std=gnu99 -g -Wall -Wextra -Werror-implicit-function-declaration -Wno-missing-field-initializers -Ilibwebsockets/include -Ijson-c RM=rm -f
LDFLAGS=-shared -g $(SANCFLAGS) $(SANLDFLAGS) CFLAGS+=$(DBGCFLAGS) -fno-omit-frame-pointer -fPIC -std=gnu99 -g -Wall -Wextra -Werror-implicit-function-declaration -Wno-missing-field-initializers -Ilibwebsockets/include -Ijson-c
LDFLAGS+=-shared -g $(DBGCFLAGS) $(DBGLDFLAGS)
LDLIBS=-lgnutls LDLIBS=-lgnutls
PREFIX ?= /usr/local
LIBDIR ?= $(PREFIX)/lib
INSTALL ?= /usr/bin/install
SRCS=slack.c \ SRCS=slack.c \
slack-api.c \ slack-api.c \
slack-buffer.c \ slack-buffer.c \
@ -43,11 +47,11 @@ weechat-slack: $(OBJS)
$(CXX) $(LDFLAGS) -o slack.so $(OBJS) $(LDLIBS) $(CXX) $(LDFLAGS) -o slack.so $(OBJS) $(LDLIBS)
libwebsockets/lib/libwebsockets.a: libwebsockets/lib/libwebsockets.a:
cd libwebsockets && cmake -DLWS_STATIC_PIC=ON -DLWS_WITH_SHARED=OFF -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITH_LIBEV=OFF -DLWS_WITH_LIBUV=OFF -DLWS_WITH_LIBEVENT=OFF -DCMAKE_BUILD_TYPE=DEBUG . cd libwebsockets && env CFLAGS= LDFLAGS= cmake -DLWS_STATIC_PIC=ON -DLWS_WITH_SHARED=OFF -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITH_LIBEV=OFF -DLWS_WITH_LIBUV=OFF -DLWS_WITH_LIBEVENT=OFF -DCMAKE_BUILD_TYPE=DEBUG .
$(MAKE) -C libwebsockets $(MAKE) -C libwebsockets
json-c/libjson-c.a: json-c/libjson-c.a:
cd json-c && cmake -DCMAKE_C_FLAGS=-fPIC . cd json-c && env CFLAGS= LDFLAGS= cmake -DCMAKE_C_FLAGS=-fPIC .
$(MAKE) -C json-c json-c-static $(MAKE) -C json-c json-c-static
depend: .depend depend: .depend
@ -60,12 +64,24 @@ clean:
$(RM) $(OBJS) $(RM) $(OBJS)
$(MAKE) -C libwebsockets clean $(MAKE) -C libwebsockets clean
$(MAKE) -C json-c clean $(MAKE) -C json-c clean
git submodule foreach --recursive git clean -xfd || true
git submodule foreach --recursive git reset --hard || true
git submodule update --init --recursive || true
distclean: clean distclean: clean
$(RM) *~ .depend $(RM) *~ .depend
install: slack.so install: slack.so
install -t ~/.weechat/plugins -D slack.so ifeq ($(shell id -u),0)
$(INSTALL) -s -t $(DESTDIR)$(LIBDIR)/weechat/plugins -D -m 0755 slack.so
else
$(INSTALL) -s -t ~/.weechat/plugins -D -m 0755 slack.so
endif
package-debian:
env ARCH=i386 gbp buildpackage --git-arch=i386 --git-ignore-new --git-pbuilder
env ARCH=amd64 gbp buildpackage --git-arch=amd64 --git-ignore-new --git-pbuilder
# gbp buildpackage -S --git-ignore-new
.PHONY: tags cs .PHONY: tags cs

2
debian/changelog vendored

@ -1,4 +1,4 @@
weechat-slack (0.1) UNRELEASED; urgency=medium weechat-slack (0.1.0) sid; urgency=medium
[ Tony Olagbaiye ] [ Tony Olagbaiye ]
* Initial release. * Initial release.

13
debian/control vendored

@ -2,17 +2,22 @@ Source: weechat-slack
Section: net Section: net
Priority: optional Priority: optional
Maintainer: Tony Olagbaiye <frony0@gmail.com> Maintainer: Tony Olagbaiye <frony0@gmail.com>
Build-Depends: cmake, debhelper (>= 11), pkg-config Build-Depends:
Standards-Version: 4.1.3 cmake, pkg-config,
debhelper (>= 11),
libssl-dev,
libgnutls28-dev
Standards-Version: 4.0.0
Homepage: https://weechat.org/ Homepage: https://weechat.org/
Vcs-Git: https://github.com/bqv/weechat-slack.git Vcs-Git: https://github.com/bqv/weechat-slack.git
Vcs-Browser: https://github.com/bqv/weechat-slack Vcs-Browser: https://github.com/bqv/weechat-slack
Package: weechat-slack Package: weechat-slack
Architecture: all Architecture: any
Depends: Depends:
weechat (>= 1.4), weechat (>= 1.4),
libwebsockets (>= 2.0) ${shlibs:Depends},
${misc:Depends}
Description: Fast, light and extensible chat client - Slack plugin Description: Fast, light and extensible chat client - Slack plugin
WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat client WeeChat (Wee Enhanced Environment for Chat) is a fast and light chat client
for many operating systems. Everything can be done with a keyboard. for many operating systems. Everything can be done with a keyboard.

1
debian/files vendored

@ -0,0 +1 @@
weechat-slack_0.1.0_source.buildinfo net optional

17
debian/rules vendored

@ -1,18 +1,17 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# You must remove unused comment lines for the released package.
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
#export DH_VERBOSE = 1 #export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=/usr/share/java/csv.jar:/usr/share/java/debug-disable.jar:/usr/share/java/itext.jar
%: %:
dh $@ --without autoreconf dh $@ --without autoreconf
override_dh_auto_install:
dh_auto_install -- LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
#override_dh_auto_install: override_dh_install:
# dh_auto_install -- prefix=/usr dh_install
#override_dh_install:
# dh_install --list-missing -X.pyc -X.pyo

@ -0,0 +1,6 @@
# This is an override for the following lintian errors:
# E: weechat-slack source: source-is-missing libwebsockets/plugins/generic-sessions/assets/lwsgs.js
# E: weechat-slack source: source-is-missing libwebsockets/plugins/generic-sessions/assets/md5.min.js
# The source is not missing, all sources are included.
# This is a lintian false-positive.
weechat-slack source: source-is-missing
Loading…
Cancel
Save