diff options
author | Samuel Walladge | 2017-12-18 09:42:55 +1030 |
---|---|---|
committer | Samuel Walladge | 2017-12-18 09:42:55 +1030 |
commit | 1885c2065b93f2b708192ec6d4dc51b092e26437 (patch) | |
tree | 440ac5f6816fe9b715ffcee55a11d03672683aca | |
parent | 5e5ea15cc2d6305a2bf853deeabb08685a357bf2 (diff) | |
download | aur-1885c2065b93f2b708192ec6d4dc51b092e26437.tar.gz |
impove pkgbuild
- remove rsync makedepends
- move some dependencies to optdepends
- use correct git pkgver
- improve generation of desktop file
- neaten package function
-rw-r--r-- | .SRCINFO | 39 | ||||
-rw-r--r-- | PKGBUILD | 74 |
2 files changed, 59 insertions, 54 deletions
@@ -1,21 +1,24 @@ +# Generated by mksrcinfo v8 +# Sun Dec 17 23:12:48 UTC 2017 pkgbase = manuskript-git - pkgdesc = Manuskript is an open-source tool for writers (git version). - pkgver = 0 - pkgrel = 3 - url = http://www.theologeek.ch/manuskript - arch = any - license = GPL3 - makedepends = git - depends = python - depends = python-pyqt5 - depends = qt5-svg - depends = python-lxml - depends = python-pyenchant - depends = hunspell-en - provides = manuskript - conflicts = manuskript - conflicts = manuskript-git - source = manuskript-git::git+https://github.com/olivierkes/manuskript#branch=master - sha1sums = SKIP + pkgdesc = Manuskript is an open-source tool for writers (git version). + pkgver = 0.6.0.r0.gd32ee37 + pkgrel = 1 + url = http://www.theologeek.ch/manuskript + arch = any + license = GPL3 + makedepends = git + makedepends = gendesk + depends = python-pyqt5 + depends = qt5-svg + depends = python-lxml + optdepends = python-pyenchant: spell check support + optdepends = python-markdown: export as html + optdepends = pandoc: more export formats + provides = manuskript + conflicts = manuskript + source = manuskript-git::git+https://github.com/olivierkes/manuskript#branch=master + sha256sums = SKIP pkgname = manuskript-git + @@ -1,53 +1,55 @@ +# Maintainer: Samuel Walladge <samuel at swalladge dot id dot au> +# Contributer: Alessandro Gario + pkgname=manuskript-git -pkgver=0 -pkgrel=3 +_pkgname=manuskript +pkgver=0.6.0.r0.gd32ee37 +pkgrel=1 arch=('any') pkgdesc="Manuskript is an open-source tool for writers (git version)." url="http://www.theologeek.ch/manuskript" license=('GPL3') -makedepends=('git') -depends=('python' 'python-pyqt5' 'qt5-svg' 'python-lxml' 'python-pyenchant' 'hunspell-en') provides=('manuskript') -conflicts=('manuskript' 'manuskript-git') +conflicts=('manuskript') + +makedepends=('git' 'gendesk') +depends=('python-pyqt5' 'qt5-svg' 'python-lxml') +optdepends=( + 'python-pyenchant: spell check support' + 'python-markdown: export as html' + 'pandoc: more export formats' +) source=("${pkgname}::git+https://github.com/olivierkes/manuskript#branch=master") -sha1sums=('SKIP') +sha256sums=('SKIP') pkgver() { - cd "${srcdir}/${pkgname}" - git log -1 --date=format:%Y%m%d --pretty=format:%ad_%h + cd "${srcdir}/${pkgname}" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + + +prepare() { + # generate a desktop file + gendesk -f -n --pkgname ${_pkgname} --pkgdesc "${pkgdesc}" --exec="${_pkgname} %U" + + # add the custom icon + printf "\nIcon=/opt/${_pkgname}/icons/Manuskript/icon-512px.png" >> "${_pkgname}.desktop" } -# base desktop launcher, missing only the icon -read -r -d '' _base_desktop_launcher << EndOfMessage -[Desktop Entry] -Comment=An open-source tool for writers. -Name=Manuskript -Terminal=false -Type=Application -EndOfMessage package() { - local install_location="/opt" - local bin_location="/usr/local/bin" - - # program files - local pkg_install_location="${pkgdir}${install_location}" - mkdir -p "$pkg_install_location" - rsync -av "${srcdir}/${pkgname}/" "${pkg_install_location}/Manuskript" --exclude '.git' - - # symlink to the binary folder - local pkg_bin_location="${pkgdir}${bin_location}" - mkdir -p "$pkg_bin_location" - ln -s "${install_location}/Manuskript/bin/manuskript" "${pkg_bin_location}/manuskript" - - # desktop launcher - mkdir -p "${pkgdir}/usr/share/applications" - - local desktop_launcher_file="${pkgdir}/usr/share/applications/manuskript.desktop" - printf "$_base_desktop_launcher" > "$desktop_launcher_file" - printf "\nIcon=${install_location}/Manuskript/icons/Manuskript/icon-512px.png" >> "$desktop_launcher_file" - printf "\nExec=${install_location}/Manuskript/bin/manuskript %%U" >> "$desktop_launcher_file" + + # copy all the files + mkdir -p "${pkgdir}/opt/${_pkgname}/" + cp -R ${srcdir}/${pkgname}/* "${pkgdir}/opt/${_pkgname}" + + # symlink the runner to $path + mkdir -p "${pkgdir}/usr/bin/" + ln -s "/opt/${_pkgname}/bin/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" + + # install the desktop launcher + install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop" } |