From 7b24c74f62ae42f70246dbbd2fcc543b3445cc48 Mon Sep 17 00:00:00 2001 From: DieGurke Date: Sun, 16 May 2021 19:22:53 +0200 Subject: [PATCH] Added PKGBUILD to work with makepkg with Arch --- PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ paperchanger.conf.sh | 2 +- paperchanger.sh | 4 ++-- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..410e413 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Maximilian Käfer +pkgname='paperchanger' +pkgver=1.0.r4.d3fd498 +pkgrel=1 +pkgdesc="CLI to help change the wallpaper in a more comfortable way." +arch=('i686' 'x86_64') +url="https://git.kske.dev/DieGurke/paperchanger" +license=('GPL') +groups=() +depends=('binutils' 'xwallpaper' 'zenity') +makedepends=('git') +checkdepends=() +optdepends=('bash') +provides=(paperchanger) +conflicts=() +replaces=() +backup=() +options=() +source=("git+$url") +noextract=() +md5sums=('SKIP') +validpgpkeys=() + +pkgver() { + cd ${pkgname} + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +package() { + cd ${pkgname} + rm -rf "${pkgdir}${HOME}/.${pkgname}" + mkdir -p "${pkgdir}${HOME}/.${pkgname}" + install -Dm755 paperchanger.conf.sh "${pkgdir}/etc/paperchanger.conf.sh" + install -Dm755 current_wallpaper.txt "${pkgdir}${HOME}/.${pkgname}/current_wallpaper.txt" + install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" + install -Dm755 paperchanger.sh "${pkgdir}/usr/bin/paperchanger" +} diff --git a/paperchanger.conf.sh b/paperchanger.conf.sh index 0061f55..79fa39d 100644 --- a/paperchanger.conf.sh +++ b/paperchanger.conf.sh @@ -1,3 +1,3 @@ # This is the configuration file used by the paperchanger program -default_directory=/win-f/Daten/Wallpaper/ +default_directory= diff --git a/paperchanger.sh b/paperchanger.sh index df9a4b4..b78afb5 100755 --- a/paperchanger.sh +++ b/paperchanger.sh @@ -2,7 +2,7 @@ # Simple CLI to make wallpaper changes with xwallpaper more comfortable -read -r current_file_path < /opt/current_wallpaper.txt +read -r current_file_path < $HOME/.paperchanger/current_wallpaper.txt source /etc/paperchanger.conf.sh @@ -29,7 +29,7 @@ function _display() { function _set() { current_file_path="$1" - echo "$current_file_path" > /opt/current_wallpaper.txt + echo "$current_file_path" > $HOME/.paperchanger/current_wallpaper.txt } function _change_config_path() {