summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dyakov2020-09-14 09:49:55 +0600
committerDenis Dyakov2020-09-14 09:49:55 +0600
commit2b1749d9ff54b0384c106e5086e37b43befb80d8 (patch)
tree1172930fb81e551eca4e8a0340b77d3bd5071611
parent6f3fee58285d65dcfab6d198fc9cefc45a37a6b1 (diff)
downloadaur-2b1749d9ff54b0384c106e5086e37b43befb80d8.tar.gz
Update to latest release v0.4.0
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD71
2 files changed, 45 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c2d2614b0f..809e725d762 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gorsync-git
pkgdesc = GTK+ frontend (backup application) for RSYNC utility.
- pkgver = 0.3.3
+ pkgver = 0.4.0
pkgrel = 1
url = https://github.com/d2r2/go-rsync
install = gorsync-git.install
diff --git a/PKGBUILD b/PKGBUILD
index 29ab2bf783a..e0413ea6fd2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,12 @@
pkgname=gorsync-git
_pkgname=go-rsync
-pkgver=0.3.3
+# It's not a problem that we have legacy version in pkgver,
+# it will be updated in the building process to the actual.
+# But better keep this value actual, since pkgver or pkgrel
+# variables are used to notify all users that an upgrade is needed:
+# https://wiki.archlinux.org/index.php/AUR_submission_guidelines
+pkgver=0.4.0
epoch=
pkgrel=1
pkgdesc="GTK+ frontend (backup application) for RSYNC utility."
@@ -13,63 +18,75 @@ makedepends=('git' 'go')
depends=('rsync' 'glib2' 'gtk3' 'libnotify')
provides=('gorsync')
install="${pkgname}.install"
-source=("${_pkgname}"::'git+https://github.com/d2r2/go-rsync.git')
+source=("${_pkgname}::git+https://github.com/d2r2/go-rsync.git")
md5sums=('SKIP')
# Get the tag of the commit to use
# Separated out to allow for `makepkg -e` not running prepare()
_get_tag() {
_tag=$(git tag --list | grep '^v' | grep -v alpha | tail -n1)
- echo "Selected git tag: $_tag" >&2 # To STDERR as called from pkgver()
+ # echo "Selected git tag: $_tag" >&2 # To STDERR as called from pkgver()
}
-prepare() {
- cd "${srcdir}/${_pkgname}"
- _get_tag
- git reset --hard "${_tag}"
+# Get desktop file content to register application in
+# Linux GUI environment.
+_get_desktop_entry_file()
+{
+ local EMBEDDED
+ EMBEDDED=$(cat << EndOfMsg
+[Desktop Entry]
+Name=Gorsync Backup
+Comment=Easy-to-use backup app based on Rsync console utility
+Exec=gorsync
+Icon=media-tape-symbolic
+Type=Application
+Encoding=UTF-8
+Terminal=false
+Categories=GNOME;GTK;Utility;System;
+Keywords=backup;rsync;
+EndOfMsg
+)
+ echo "${EMBEDDED}"
}
+# prepare() {
+# cd "${srcdir}/${_pkgname}"
+# _get_tag
+# git reset --hard "${_tag}"
+# }
+
pkgver() {
cd "${srcdir}/${_pkgname}"
- [[ -z ${_tag-} ]] && _get_tag
+ _get_tag
# Example: v2.1.0-beta-3 -> 2.1.0.beta.r3
# Version specification: https://github.com/robert7/nixnote2/issues/28
# echo "$_tag" | sed -E 's/^v//;s/-?([0-9]+)$/.r\1/;s/-/./'
echo "${_tag}" | sed 's/^v//;s/-/./g'
}
-
-#pkgver() {
-# cd "${srcdir}/${_pkgname}"
-# git describe --tags --long | sed 's/^v//;s/-/./g'
-#}
-
build() {
rm -rf "${srcdir}/.go/src"
mkdir -p "${srcdir}/.go/src/github.com/d2r2"
# 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.
- # Probably the cycle should be eliminated in next releases.
- n=0
- until [ $n -ge 1 ]
- do
- GOPATH="${srcdir}/.go" go get -v -u ./... && \
- GOPATH="${srcdir}/.go" ./gorsync_build.sh --buildtype Release && \
- break # substitute your command here
- n=$[$n+1]
- sleep 1
- done
+ _get_tag
+ # echo "Tag ${_tag}"
+ GOPATH="${srcdir}/.go" go get -v -u ./... && \
+ git reset --hard "${_tag}" && \
+ GOPATH="${srcdir}/.go" ./gorsync_build.sh --buildtype Release
}
package() {
_binname="gorsync"
# echo "Working dir $(pwd)"
+ # echo "Srcdir dir ${srcdir}"
cd "${srcdir}/.go/src/github.com/d2r2/${_pkgname}"
install -Dm755 "${_binname}" "${pkgdir}/usr/bin/${_binname}"
- install -Dm644 "packaging/fpm_packages/gorsync.desktop" "$pkgdir/usr/share/applications/gorsync.desktop"
+ _appsharedir="${pkgdir}/usr/share/applications"
+ mkdir -p "${_appsharedir}" && \
+ echo "$(_get_desktop_entry_file)" > "${_appsharedir}/gorsync.desktop" && \
+ chmod 644 "${_appsharedir}/gorsync.desktop"
install -Dm644 "ui/gtkui/gsettings/org.d2r2.gorsync.gschema.xml" "$pkgdir/gsettings/org.d2r2.gorsync.gschema.xml"
# install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
}