summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikos Toutountzoglou2023-02-01 00:51:33 +0100
committerNikos Toutountzoglou2023-02-01 00:51:33 +0100
commitdb007076676ef7277a4f994c4e3bd489043a034e (patch)
tree82c015d95f07a7538a753da67894546635d1a39f
parent42f1e278246711ec118aa83ad0e17a76fd3d941e (diff)
downloadaur-db007076676ef7277a4f994c4e3bd489043a034e.tar.gz
Fix to install DotNet 6. Remake of PKGBUILD script.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD52
-rwxr-xr-xwg++.sh96
3 files changed, 123 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4331ada76b88..8d0b146f64b5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,18 @@
pkgbase = wg++
pkgdesc = WebGrab+Plus is a freeware (license via donation) multi-site incremental XMLTV EPG grabber.
- pkgver = 5.0
+ pkgver = 5.0.1
pkgrel = 1
url = http://webgrabplus.com/
arch = any
license = custom
makedepends = git
- depends = dotnet-host
- depends = dotnet-runtime
+ depends = dotnet-runtime-6.0-bin
provides = wg++
+ conflicts = wg++
source = http://www.webgrabplus.com/sites/default/files/download/SW/V4.2.2/WebGrabPlus_V4.2_install.tar.gz
source = http://webgrabplus.com/sites/default/files/download/SW/V5.0.1/WebGrabPlus_V5.0.1_beta_install.tar.gz
source = git+https://github.com/SilentButeo2/webgrabplus-siteinipack.git
- source = wg++
+ source = wg++.sh
md5sums = 569b438673a4e1963c52f62c26bbcf16
md5sums = 4b53c034a71ba316eb18d49fb4ca853b
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 0fc64f8716c5..53505b5323a5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,46 +1,40 @@
# Maintainer: Nikos Toutountzoglou <nikos.toutou@gmail.com>
-
pkgname=wg++
-pkgver=5.0
+pkgver=5.0.1
pkgrel=1
pkgdesc='WebGrab+Plus is a freeware (license via donation) multi-site incremental XMLTV EPG grabber.'
arch=('any')
url='http://webgrabplus.com/'
license=('custom')
-depends=(
- 'dotnet-host'
- 'dotnet-runtime'
- )
+depends=('dotnet-runtime-6.0-bin')
makedepends=('git')
provides=('wg++')
+conflicts=('wg++')
source=("http://www.webgrabplus.com/sites/default/files/download/SW/V4.2.2/WebGrabPlus_V4.2_install.tar.gz"
"http://webgrabplus.com/sites/default/files/download/SW/V5.0.1/WebGrabPlus_V5.0.1_beta_install.tar.gz"
- "git+https://github.com/SilentButeo2/webgrabplus-siteinipack.git"
- "wg++")
-
+ "git+https://github.com/SilentButeo2/webgrabplus-siteinipack.git"
+ "wg++.sh")
md5sums=('569b438673a4e1963c52f62c26bbcf16'
'4b53c034a71ba316eb18d49fb4ca853b'
'SKIP'
'b9fc49688d55da5cf447b7a7b9a45361')
-package() {
- # Install application files
- mkdir -p "${pkgdir}/opt/wg++"
- cp -r "${srcdir}/.wg++/bin.net" "${pkgdir}/opt/wg++/"
- cp -r "${srcdir}/.wg++/doc" "${pkgdir}/opt/wg++/"
- cp -r "${srcdir}/webgrabplus-siteinipack/siteini.pack" "${pkgdir}/opt/wg++/"
-
- # Install configuration files
- mkdir -p "${pkgdir}/usr/share/wg++"
- cp -r "${srcdir}/webgrabplus-siteinipack/siteini.pack" "${pkgdir}/usr/share/wg++/siteini.pack"
- cp -r "${srcdir}/.wg++/bin.net" "${pkgdir}/usr/share/wg++/"
- cp -r "${srcdir}/.wg++/mdb" "${pkgdir}/usr/share/wg++/"
- mv "${pkgdir}/usr/share/wg++/mdb/mdb.config.example.xml" "${pkgdir}/usr/share/wg++/mdb/mdb.config.xml"
- cp -r "${srcdir}/.wg++/rex" "${pkgdir}/usr/share/wg++/"
- mv "${pkgdir}/usr/share/wg++/rex/rex.config.example.xml" "${pkgdir}/usr/share/wg++/rex/rex.config.xml"
- cp -r "${srcdir}/.wg++/siteini.user" "${pkgdir}/usr/share/wg++/"
- cp -n "${srcdir}/.wg++/WebGrab++.config.example.xml" "${pkgdir}/usr/share/wg++/WebGrab++.config.xml"
-
- # Executable
- install -Dm755 "${srcdir}/wg++" "${pkgdir}/usr/bin/wg++"
+prepare() {
+ cd "${srcdir}"
+ rm -rf ".${pkgname}/siteini.pack.update"
+ mv -f ".${pkgname}/mdb/mdb.config.example.xml" ".${pkgname}/mdb/mdb.config.xml"
+ mv -f ".${pkgname}/rex/rex.config.example.xml" ".${pkgname}/rex/rex.config.xml"
+ mv -f ".${pkgname}/" "${pkgname}/"
}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ install -d "${pkgdir}/opt/"
+ install -d "${pkgdir}/usr/share/"
+ mkdir "${pkgdir}/opt/${pkgname}"
+ mkdir "${pkgdir}/opt/${pkgname}/siteini.pack"
+ cp -r --preserve=mode * "${pkgdir}/opt/${pkgname}"
+ cp -r --preserve=mode ../webgrabplus-siteinipack/siteini.pack/* "${pkgdir}/opt/${pkgname}/siteini.pack"
+ cp -r "${pkgdir}/opt/${pkgname}" "${pkgdir}/usr/share/${pkgname}"
+ install -Dm755 "${srcdir}/${pkgname}.sh" "$pkgdir/usr/bin/${pkgname}"
+} \ No newline at end of file
diff --git a/wg++.sh b/wg++.sh
new file mode 100755
index 000000000000..88bf70c74e30
--- /dev/null
+++ b/wg++.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+#/**
+# * @file wg++
+# * @brief just start WebGrab+Plus
+# * @author WebGrab+Plus Community
+# * @date 31/07/2016
+# * @dotnet version
+# * @date 13/03/2022
+# */
+
+CONFIG_DIR=~/wg++
+EXECUTABLE=$(basename $0)
+
+print_help () {
+ echo -e "Usage:"
+ echo -e "\t$EXECUTABLE - Uses default '$CONFIG_DIR' configuration directory. Will be created if missing."
+ echo -e "\t$EXECUTABLE <path> - Path to configuration directory."
+ echo -e "\t$EXECUTABLE --help - Show help screen."
+ echo -e "\t"
+ echo -e "Configuration template is stored in '/usr/share/wg++'. Copy it to your preferred location:"
+ echo -e "\tcp -R /usr/share/wg++ /path/to/<configuration_directory>"
+}
+
+# Check if user supplied any arguments
+if [ $# -eq 0 ]; then
+ #### User did not provide any arguments to wg++ ####
+
+ # Use default config dir "$CONFIG_DIR"
+ if [ ! -d "$CONFIG_DIR" ]; then
+ cp -R /usr/share/wg++ "$CONFIG_DIR"
+ if [ -d "$CONFIG_DIR" ]; then
+ echo "Configuration folder '$CONFIG_DIR' created! Run '$EXECUTABLE' again to use it."
+ echo "For more information, see '$EXECUTABLE --help'."
+ exit 0
+ else
+ echo "Failed to create configuration folder '$CONFIG_DIR'!"
+ print_help
+ exit 1
+ fi
+ fi
+
+ # Check if "$CONFIG_DIR" contains configuration file
+ if [ ! -f "$CONFIG_DIR/WebGrab++.config.xml" ]; then
+ echo "Some configuration files are missing from '$CONFIG_DIR' directory!"
+ print_help
+ exit 1
+ fi
+
+ # Double check if user can read/write "$CONFIG_DIR"
+ if [ ! -r "$CONFIG_DIR/WebGrab++.config.xml" ] || [ ! -w "$CONFIG_DIR/WebGrab++.config.xml" ]; then
+ echo "You do not have read/write access in '$CONFIG_DIR'."
+ print_help
+ exit 1
+ fi
+
+ dotnet /opt/wg++/bin.net/WebGrab+Plus.dll "$CONFIG_DIR"
+else
+ #### User provided arguments to wg++ ####
+
+ # Check if there is 1 argument. Exit if more
+ if [ $# -ge 2 ]; then
+ echo "Invalid path! You need to provide a path to WebGrabber+Plus configuration directory."
+ print_help
+ exit 1
+ fi
+
+ # Check if user asked for help
+ if [ "$1" == "-h" ] || [ "$1" == "-H" ] || [ "$1" == "--help" ] || [ "$1" == "--HELP" ]; then
+ print_help
+ exit 0
+ fi
+
+ # Check if given parameter is existing directory
+ if [ ! -d "$1" ]; then
+ echo "Invalid path! You need to provide a path to WebGrabber+Plus configuration directory."
+ print_help
+ exit 1
+ fi
+
+ # Check if directory contains configuration file
+ if [ ! -f "$1/WebGrab++.config.xml" ]; then
+ echo "Wrong path! Your provided path does not contain configuration files."
+ print_help
+ exit 1
+ fi
+
+ # Check if user has read/write access to given path
+ if [ ! -r "$1/WebGrab++.config.xml" ] || [ ! -w "$1/WebGrab++.config.xml" ]; then
+ echo "You do not have read/write access to your given directory."
+ print_help
+ exit 1
+ fi
+
+ dotnet /opt/wg++/bin.net/WebGrab+Plus.dll "$1"
+fi