summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Alff2019-05-19 11:05:16 -0400
committerTed Alff2019-05-19 11:05:16 -0400
commitde51402feb3ac95118ea8b45e780a23024b9b47c (patch)
tree2501df7e4481ae59d81a32bcf9887eb2b478dc3a
downloadaur-de51402feb3ac95118ea8b45e780a23024b9b47c.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD48
-rw-r--r--write_to_confdir.patch66
3 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..fe6d5f8b717
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = superpaper
+ pkgdesc = Cross-platform multi monitor wallpaper manager
+ pkgver = 1.1.1
+ pkgrel = 1
+ url = https://github.com/hhannine/Superpaper
+ arch = any
+ license = MIT
+ makedepends = python-setuptools
+ depends = python-pillow
+ depends = python-screeninfo
+ depends = python-wxpython
+ depends = python-system_hotkey
+ source = superpaper-1.1.1.tar.gz::https://github.com/hhannine/Superpaper/archive/v1.1.1.tar.gz
+ source = write_to_confdir.patch
+ sha256sums = 1defc8b55b1ffa87d37d918ab646e210c88525acdc21c38f4100bf08209d4239
+ sha256sums = 869aafccfd75f514bf0956bc32df419e4dc7c49c5c11dd8f057e9aebd8ab6e52
+
+pkgname = superpaper
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..84b8773fb19
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Contributor: twa022 <twa022 at gmail dot com>
+
+pkgname=superpaper
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="Cross-platform multi monitor wallpaper manager"
+arch=('any')
+url="https://github.com/hhannine/Superpaper"
+license=('MIT')
+depends=('python-pillow' 'python-screeninfo' 'python-wxpython' 'python-system_hotkey')
+makedepends=('python-setuptools')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hhannine/${pkgname^}/archive/v${pkgver}.tar.gz"
+ 'write_to_confdir.patch')
+sha256sums=('1defc8b55b1ffa87d37d918ab646e210c88525acdc21c38f4100bf08209d4239'
+ '869aafccfd75f514bf0956bc32df419e4dc7c49c5c11dd8f057e9aebd8ab6e52')
+
+prepare() {
+ cd "${srcdir}/${pkgname^}-${pkgver}"
+ patch -uNp2 -r- -i ../write_to_confdir.patch
+}
+
+package() {
+ mkdir -p "${pkgdir}"/usr/{bin,lib,share/applications}
+ cp -ar "${srcdir}/${pkgname^}-${pkgver}" "${pkgdir}"/usr/lib/"${pkgname}"
+
+ cat > "${pkgdir}"/usr/bin/"${pkgname}" <<- __EOF__
+ #!/bin/bash
+
+ python /usr/lib/superpaper/superpaper.pyw
+ exit $?
+ __EOF__
+ chmod +x "${pkgdir}"/usr/bin/"${pkgname}"
+
+ cat > "${pkgdir}"/usr/share/applications/"${pkgname}".desktop <<- __EOF__
+ [Desktop Entry]
+ Version=1.0
+ Type=Application
+ Name=Superpaper
+ Comment=$pkgdesc
+ Exec=/usr/bin/$pkgname
+ Icon=/usr/lib/superpaper/resources/icons8-panorama-filled-96.png
+ Categories=Utilities;
+ Terminal=false
+ StartupNotify=false
+ __EOF__
+}
diff --git a/write_to_confdir.patch b/write_to_confdir.patch
new file mode 100644
index 00000000000..989d381457e
--- /dev/null
+++ b/write_to_confdir.patch
@@ -0,0 +1,66 @@
+diff -Naur ./Superpaper-1.1.1.orig/superpaper.pyw ./Superpaper-1.1.1/superpaper.pyw
+--- ./Superpaper-1.1.1.orig/superpaper.pyw 2019-05-19 10:46:28.018404320 -0400
++++ ./Superpaper-1.1.1/superpaper.pyw 2019-05-19 10:50:10.335921834 -0400
+@@ -50,11 +50,14 @@
+ PATH = os.path.dirname(os.path.realpath(sys.executable))
+ else:
+ PATH = os.path.dirname(os.path.realpath(__file__))
++CONF_PATH = os.path.expanduser( "~/.config/superpaper" )
+ # Derivative paths
+-TEMP_PATH = PATH + "/temp/"
++TEMP_PATH = CONF_PATH + "/temp/"
+ if not os.path.isdir(TEMP_PATH):
+- os.mkdir(TEMP_PATH)
+-PROFILES_PATH = PATH + "/profiles/"
++ os.makedirs(TEMP_PATH, exist_ok=True)
++PROFILES_PATH = CONF_PATH + "/profiles/"
++if not os.path.isdir(PROFILES_PATH):
++ os.makedirs(PROFILES_PATH, exist_ok=True)
+ TRAY_TOOLTIP = "Superpaper"
+ TRAY_ICON = PATH + "/resources/default.png"
+ VERSION_STRING = "1.1.1"
+@@ -71,7 +74,7 @@
+ DEBUG = True
+ # sys.stdout = open(PATH + "/log.txt", "w")
+ g_logger.setLevel(logging.INFO)
+- fileHandler = logging.FileHandler("{0}/{1}.log".format(PATH, "log"),
++ fileHandler = logging.FileHandler("{0}/{1}.log".format(CONF_PATH, "log"),
+ mode="w")
+ g_logger.addHandler(fileHandler)
+ consoleHandler = logging.StreamHandler()
+@@ -104,7 +107,7 @@
+ def parse_settings(self):
+ global DEBUG, LOGGING, g_set_command_string
+ global g_logger, fileHandler, consoleHandler
+- fname = os.path.join(PATH, "general_settings")
++ fname = os.path.join(CONF_PATH, "general_settings")
+ if os.path.isfile(fname):
+ f = open(fname, "r")
+ try:
+@@ -123,7 +126,7 @@
+ sys.excepthook = custom_exception_handler
+ fileHandler = logging.FileHandler(
+ "{0}/{1}.log"
+- .format(PATH, "log"),
++ .format(CONF_PATH, "log"),
+ mode="w")
+ g_logger.addHandler(fileHandler)
+ consoleHandler = logging.StreamHandler()
+@@ -185,7 +188,7 @@
+ f.close()
+
+ def Save(self):
+- fname = os.path.join(PATH, "general_settings")
++ fname = os.path.join(CONF_PATH, "general_settings")
+ f = open(fname, "w")
+
+ if self.logging:
+@@ -2018,7 +2021,7 @@
+ current_settings = GeneralSettingsData()
+ show_help = current_settings.show_help
+
+- fname = os.path.join(PATH, "general_settings")
++ fname = os.path.join(CONF_PATH, "general_settings")
+ f = open(fname, "w")
+ if self.cb_logging.GetValue():
+ f.write("logging=true\n")