Advertisement
Guest User

WIP - PKGBUILD for plank-themer

a guest
Jun 9th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.57 KB | None | 0 0
  1. # Maintainer: Que Quotion <quequotion@mailinator.com>
  2.  
  3. pkgname=plank-themer-git
  4. _gitname=plank-themer
  5. pkgver=6b66d2d
  6. pkgrel=1
  7. pkgdesc="A small program that allows you to change Plank Dock themes without any additional consumption of resources"
  8. arch=('i686' 'x86_64')
  9. url="http://rhoconlinux.github.io/plank-themer/"
  10. license=('LGPL')
  11. depends=('bash' 'plank')
  12. makedepends=('bash')
  13. provides=("plank-themer=${pkgver}" "plank-themer-git=${pkgver}")
  14. conflicts=()
  15. replaces=('plank-themer')
  16. install=plank-themer.install
  17. source=('git://github.com/rhoconlinux/plank-themer')
  18. sha512sums=('SKIP')
  19.  
  20. pkgver() {
  21.   cd "${_gitname}"
  22.   git describe --always | sed 's/-/./g'
  23. }
  24.  
  25. prepare() {
  26.   rm -rf ${_gitname}/themes-repo/Themes/Pantheon # Conflicts with plank-theme-pantheon(-bzr); probably not as up-to-date.
  27. }
  28.  
  29. package() {
  30.  
  31.   # This should go in /usr/share/somewhere, but the scripts aren't set up for that.
  32.   # Tried "install -Ddm644 -o ${USER} -g ${USER}", but "sudo pacman -U plank-themer-git"
  33.   # gives a warning about incorrect permissions and the ownership gets scrambled.
  34.   # Installing everything as root in ${USER}'s home and fixing it in post_install() seems
  35.   # to be the only option, but that doesn't work either.
  36.   install -Dd ${pkgdir}${HOME}/.config/plank/dock1/theme_index
  37.   for i in ${_gitname}/theme_index/*
  38.     do
  39.       if [[ -d ${i} ]]; then
  40.         install -Dd ${pkgdir}${HOME}/.config/plank/dock1/theme_index/$(basename ${i})
  41.         install -D ${i}/* ${pkgdir}${HOME}/.config/plank/dock1/theme_index/$(basename ${i})/
  42.       else
  43.         install -D ${i} ${pkgdir}${HOME}/.config/plank/dock1/theme_index/
  44.       fi
  45.     done
  46.  
  47.   # This should go in /usr/share/somewhere, but the scripts aren't set up for that.
  48.   # Tried "install -Ddm644 -o ${USER} -g ${USER}", but "sudo pacman -U plank-themer-git"
  49.   # gives a warning about incorrect permissions and the ownership gets scrambled.
  50.   # Installing everything as root in ${USER}'s home and fixing it in post_install() seems
  51.   # to be the only option, but that doesn't work either.
  52.   install -Dd ${pkgdir}${HOME}/.config/plank/dock1/themes-repo
  53.   for i in ${_gitname}/themes-repo/Themes/*/
  54.     do
  55.       install -Dd ${pkgdir}${HOME}/.config/plank/dock1/themes-repo/$(basename ${i})
  56.       install -D ${i}/* ${pkgdir}${HOME}/.config/plank/dock1/themes-repo/$(basename ${i})/
  57.     done
  58.  
  59.   # No trouble here!
  60.   for i in ${_gitname}/themes-repo/Themes/*/
  61.     do
  62.       install -Ddm644 ${pkgdir}/usr/share/plank/themes/$(basename ${i})
  63.       install -m664 ${i}/* ${pkgdir}/usr/share/plank/themes/$(basename ${i})/
  64.     done
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement