Receipt for: copyq

source
# SliTaz package receipt.

PACKAGE="copyq"
VERSION="2.4.2"
CATEGORY="utilities"
SHORT_DESC="Clipboard Manager with Advanced Features"
WEB_SITE="http://hluk.github.io/CopyQ/"
LICENSE="GPL3"
TARBALL="$PACKAGE-$VERSION.tar.gz"
MAINTAINER="psychomaniak@xakep.ru"
WGET_URL="https://github.com/hluk/CopyQ/archive/v$VERSION.tar.gz"

DEPENDS="libQtGui libQtNetwork libQtScript libQtSvg librsvg libQtXml libQtWebkit"
BUILD_DEPENDS="wget Qt4-dev cmake qmake"

# What is the latest version available today?
current_version()
{
	wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
	sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	cat > p.diff <<EOT
--- o.cpp
+++ configurationmanager.cpp
@@ -54 +54 @@
-#   define DEFAULT_EDITOR "gedit %1"
+#   define DEFAULT_EDITOR "editor %1"
@@ -468 +468 @@
-    bind("check_selection", ui->checkBoxSel, false);
+    bind("check_selection", ui->checkBoxSel, true);
EOT
	patch $src/src/gui/configurationmanager.cpp p.diff
	mkdir $src/b
	cd $src/b &&
	cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 &&
	make &&	make install
	rm -rf $src/b
}

genpkg_rules()
{
	cp -a $install/* $fs
}