summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dyakov2019-11-25 01:03:31 +0600
committerDenis Dyakov2019-11-25 01:03:31 +0600
commit6f3fee58285d65dcfab6d198fc9cefc45a37a6b1 (patch)
treef0f0f11c895a27494b31a0c2ba94309f4eb450d8
parent497d858dd1ef0cc3233266a45fba1df1d413d3a1 (diff)
downloadaur-6f3fee58285d65dcfab6d198fc9cefc45a37a6b1.tar.gz
Fix bug in PKGBUILD and update to latest release v0.3.3
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
-rw-r--r--gorsync-git.install110
3 files changed, 98 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d8c855b79cb..4c2d2614b0f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gorsync-git
- pkgdesc = Best GTK+ client frontend for RSYNC console utility.
- pkgver = 0.3.2
+ pkgdesc = GTK+ frontend (backup application) for RSYNC utility.
+ pkgver = 0.3.3
pkgrel = 1
url = https://github.com/d2r2/go-rsync
install = gorsync-git.install
diff --git a/PKGBUILD b/PKGBUILD
index 6c6d9f6951f..29ab2bf783a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,10 +2,10 @@
pkgname=gorsync-git
_pkgname=go-rsync
-pkgver=0.3.2
+pkgver=0.3.3
epoch=
pkgrel=1
-pkgdesc="Best GTK+ client frontend for RSYNC console utility."
+pkgdesc="GTK+ frontend (backup application) for RSYNC utility."
arch=('x86_64' 'i686')
url="https://github.com/d2r2/go-rsync"
license=('GPL3')
@@ -50,12 +50,13 @@ build() {
# export GOPATH="${srcdir}/.go"
mv "${srcdir}/${_pkgname}" "${srcdir}/.go/src/github.com/d2r2/"
cd "${srcdir}/.go/src/github.com/d2r2/${_pkgname}/"
- # download and build main package and all dependencies
- # retrying n times, due to issue with go get functionality
+ # Download and build main package and all dependencies
+ # retrying n times, due to issue(?) with go get functionality.
+ # Probably the cycle should be eliminated in next releases.
n=0
- until [ $n -ge 7 ]
+ until [ $n -ge 1 ]
do
- GOPATH="${srcdir}/.go" go get -v all && \
+ GOPATH="${srcdir}/.go" go get -v -u ./... && \
GOPATH="${srcdir}/.go" ./gorsync_build.sh --buildtype Release && \
break # substitute your command here
n=$[$n+1]
diff --git a/gorsync-git.install b/gorsync-git.install
index 92a840bd1ae..00378f5de1b 100644
--- a/gorsync-git.install
+++ b/gorsync-git.install
@@ -2,13 +2,50 @@ post_install() {
:
#!/usr/bin/env sh
-#if [ -z "$1" ]; then
- export PREFIX=/usr
-#else
+# !!! This script is a part of distribution packaging system !!!
+# !!! Each line of this script was tested and debugged on Linux 32bit, Linux 64bit, FreeBSD !!!
+# !!! Change with great care, do not break it !!!
+
+SCHEMA_FILE="org.d2r2.gorsync.gschema.xml"
+
+get_gsettings_schema_file()
+{
+ local EMBEDDED
+ # ***** !!!!! DO NOT REMOVE THIS COMMENT BLOCK - HEREDOC WILL BE POSTED HERE !!!!! *****
+ # AUTOMATICALLY_REPLACED_WITH_EMBEDDED_XML_FILE_DECLARATION
+ # ***** !!!!! DO NOT REMOVE THIS COMMENT BLOCK - HEREDOC WILL BE POSTED HERE !!!!! *****
+ if [ ${#EMBEDDED} -le 0 ]; then
+ cat "gsettings/${SCHEMA_FILE}"
+ else
+ echo "${EMBEDDED}"
+ fi
+}
+
+
+# if [ -z "$1" ]; then
+ PREFIX=/usr
+ OS_LOWERCASE=$(echo "$OSTYPE" | tr "[:upper:]" "[:lower:]")
+ # FreeBSD
+ if [ "$OS_LOWERCASE" = "freebsd" ]; then
+ PREFIX="${PREFIX}/local"
+ # Linux OS
+ # elif [[ "$OSTYPE" == "linux-gnu" ]]; then
+ # Mac OSX
+ # elif [[ "$OSTYPE" == "darwin"* ]]; then
+ # POSIX compatibility layer and Linux environment emulation for Windows
+ # elif [[ "$OSTYPE" == "cygwin" ]]; then
+ # Lightweight shell and GNU utilities compiled for Windows (part of MinGW)
+ # elif [[ "$OSTYPE" == "msys" ]]; then
+ # Windows
+ # elif [[ "$OSTYPE" == "win32" ]]; then
+ # else
+ # Unknown.
+ fi
+# else
# export PREFIX=$1
-#fi
+# fi
-if [ "$PREFIX" = "/usr" ] && [ "$(id -u)" != "0" ]; then
+if [ "$(id -u)" != "0" ]; then
# Make sure only root can run our script
echo "This script must be run as root" 1>&2
exit 1
@@ -38,34 +75,65 @@ for COMMAND in $COMMANDS; do
i=$(( $i + 1 ))
done
-echo "Installing gsettings schema to prefix ${PREFIX}"
+SCHEMA_PATH=${PREFIX}/share/glib-2.0/schemas
+echo "Installing gsettings schema to ${SCHEMA_PATH}"
# Copy and compile schema
echo "Copying and compiling schema..."
-install -d ${PREFIX}/share/glib-2.0/schemas
-install -m 644 gsettings/org.d2r2.gorsync.gschema.xml ${PREFIX}/share/glib-2.0/schemas/
-glib-compile-schemas ${PREFIX}/share/glib-2.0/schemas/
-
+install -d ${SCHEMA_PATH}
+# install -m 644 gsettings/${SCHEMA_FILE} ${SCHEMA_PATH}/
+echo "$(get_gsettings_schema_file)" > ${SCHEMA_PATH}/${SCHEMA_FILE}
+chmod 0644 ${SCHEMA_PATH}/${SCHEMA_FILE}
+# Redirect output to /dev/null help on some linux distributions (redhat), which produce
+# lot of warnings about "Schema ... are depricated." not related to application.
+glib-compile-schemas ${SCHEMA_PATH}/ 2>/dev/null
}
+
+
pre_remove() {
:
#!/usr/bin/env sh
-#if [ -z "$1" ]; then
- export PREFIX=/usr
- # Make sure only root can run our script
- if [ "$(id -u)" != "0" ]; then
- echo "This script must be run as root" 1>&2
- exit 1
+# !!! This script is a part of distribution packaging system !!!
+# !!! Each line of this script was tested and debugged on Linux 32bit, Linux 64bit, FreeBSD !!!
+# !!! Change with great care, do not break it !!!
+
+# if [ -z "$1" ]; then
+ PREFIX=/usr
+
+ # FreeBSD
+ if [ $(echo "$OSTYPE" | tr "[:upper:]" "[:lower:]") == "freebsd" ]; then
+ PREFIX="${PREFIX}/local"
+ # Linux OS
+ # elif [[ "$OSTYPE" == "linux-gnu" ]]; then
+ # Mac OSX
+ # elif [[ "$OSTYPE" == "darwin"* ]]; then
+ # POSIX compatibility layer and Linux environment emulation for Windows
+ # elif [[ "$OSTYPE" == "cygwin" ]]; then
+ # Lightweight shell and GNU utilities compiled for Windows (part of MinGW)
+ # elif [[ "$OSTYPE" == "msys" ]]; then
+ # Windows
+ # elif [[ "$OSTYPE" == "win32" ]]; then
+ # else
+ # Unknown.
fi
-#else
+# else
# export PREFIX=$1
-#fi
+# fi
+
+if [ "$(id -u)" != "0" ]; then
+ # Make sure only root can run our script
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
-echo "Uninstalling gsettings schema from prefix ${PREFIX}"
+SCHEMA_PATH=${PREFIX}/share/glib-2.0/schemas
+echo "Uninstalling gsettings schema from ${SCHEMA_PATH}"
-rm ${PREFIX}/share/glib-2.0/schemas/org.d2r2.gorsync.gschema.xml
-glib-compile-schemas ${PREFIX}/share/glib-2.0/schemas/
+rm ${SCHEMA_PATH}/org.d2r2.gorsync.gschema.xml
+# Redirect output to /dev/null help on some linux distributions (redhat), which produce
+# lot of warnings about "Schema ... are depricated." not related to application.
+glib-compile-schemas ${SCHEMA_PATH}/ 2>/dev/null
}