purple-hangouts-hg: New package.

This commit is contained in:
Renato Silva
2016-06-28 10:58:02 -03:00
parent c824c5f7eb
commit 69fab7a328
2 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# MSYS2 makefile for Purple Hangouts
CFLAGS := $(shell pkg-config --cflags purple libprotobuf-c json-glib-1.0) -Ipurple2compat
LIBS := $(shell pkg-config --libs purple libprotobuf-c json-glib-1.0) -lz
PURPLE_PLUGIN_DIR := $(shell pkg-config --variable=plugindir purple)
PURPLE_DATA_ROOT := $(shell pkg-config --variable=datarootdir purple)
PURPLE_PLUGIN_DIR := $(shell cygpath --unix '$(PURPLE_PLUGIN_DIR)')
PURPLE_DATA_ROOT := $(shell cygpath --unix '$(PURPLE_DATA_ROOT)')
SOURCES = \
hangout_media.pb-c.c \
hangouts.pb-c.c \
hangouts_auth.c \
hangouts_connection.c \
hangouts_conversation.c \
hangouts_events.c \
hangouts_json.c \
hangouts_media.c \
hangouts_pblite.c \
libhangouts.c \
purple2compat/http.c \
purple2compat/purple-socket.c
.PHONY: all install clean
all: libhangouts.dll
hangouts.pb-c.c: hangouts.proto
protoc-c --c_out=. hangouts.proto
hangout_media.pb-c.c: hangout_media.proto
protoc-c --c_out=. hangout_media.proto
libhangouts.dll: $(SOURCES)
gcc -Wall -shared -pipe -O2 -g -DPURPLE_PLUGINS -DENABLE_NLS $(SOURCES) $(CFLAGS) $(LIBS) -o $@
install:
install -Dm755 libhangouts.dll $(DESTDIR)$(PURPLE_PLUGIN_DIR)/libhangouts.dll
install -Dm644 hangouts16.png $(DESTDIR)$(PURPLE_DATA_ROOT)/pixmaps/pidgin/protocols/16/hangouts.png
install -Dm644 hangouts22.png $(DESTDIR)$(PURPLE_DATA_ROOT)/pixmaps/pidgin/protocols/22/hangouts.png
install -Dm644 hangouts48.png $(DESTDIR)$(PURPLE_DATA_ROOT)/pixmaps/pidgin/protocols/48/hangouts.png
clean:
rm -f libhangouts.dll
rm -f hangouts.pb-c.h
rm -f hangouts.pb-c.c
rm -f hangout_media.pb-c.h
rm -f hangout_media.pb-c.c

View File

@@ -0,0 +1,52 @@
# Maintainer: Renato Silva <br.renatosilva@gmail.com>
_realname='purple-hangouts'
pkgbase="mingw-w64-${_realname}-hg"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-hg"
pkgver=r260+.df08afb3435d+
pkgrel=1
pkgdesc='Hangouts plugin for libpurple (mingw-w64)'
url='https://bitbucket.org/EionRobb/purple-hangouts'
license=(GPL3+)
arch=('any')
options=(!libtool strip staticlibs)
source=('hg+https://bitbucket.org/EionRobb/purple-hangouts'
Makefile)
sha256sums=('SKIP'
'772a5b915291986bd67862de2739106c9234c77d5510236487142cf5d27dfcc6')
conflicts=(${MINGW_PACKAGE_PREFIX}-${_realname})
provides=(${MINGW_PACKAGE_PREFIX}-${_realname})
depends=(${MINGW_PACKAGE_PREFIX}-libpurple
${MINGW_PACKAGE_PREFIX}-protobuf-c
${MINGW_PACKAGE_PREFIX}-json-glib
${MINGW_PACKAGE_PREFIX}-glib2
${MINGW_PACKAGE_PREFIX}-zlib
${MINGW_PACKAGE_PREFIX}-gettext
${MINGW_PACKAGE_PREFIX}-gcc-libs)
makedepends=(${MINGW_PACKAGE_PREFIX}-gcc
${MINGW_PACKAGE_PREFIX}-pkg-config
rsync mercurial)
pkgver() {
cd "${srcdir}/${_realname}"
printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}
prepare() {
cd "${srcdir}"
mv Makefile "${_realname}"
}
build() {
msg2 'Synchronizing build directory'
rsync --recursive --times "${srcdir}/${_realname}"/* "${srcdir}/${_realname}.build.${CARCH}"
cd "${srcdir}/${_realname}.build.${CARCH}"
make
}
package() {
cd "${srcdir}/${_realname}.build.${CARCH}"
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}/${_realname}/gpl3.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/gpl3.txt"
}