You are not logged in.
I have published a python2 application, which uses setup.py to install. However, try as I may, I cannot get setup.py to correctly install into /usr/share. So I've used the PKGBUILD to install an icon and the LICENSE.
The pkgbuild is in the AUR already, but I'll post it here. It does install viably in my system, but I would appreciate any advice. Also, namcap says the depends are not needed... I'm not sure why?
One more thing: I plan to remove the items which have no content, isn't that proper?
# Maintainer: Bob Allred <balinbob@gmail.com>
pkgname=scenic
pkgver=r23.599d0a6
pkgrel=1
pkgdesc="wallpaper browser/cycler for fluxbox, etc, and batch image-processing frontend for CLI programs such as feh and imagemagick"
arch=('any')
url="https://github.com/balinbob/scenic"
license=('GPL3')
groups=()
depends=('python2' 'gtk2' 'pygtk' 'python2-keybinder2' 'python2-gobject' 'python2-dbus')
makedepends=('git')
optdepends=('feh' 'imagemagick')
provides=()
conflicts=()
replaces=()
backup=()
options=(!emptydirs)
install=
source=('git+https://github.com/balinbob/scenic')
_gitname='scenic'
md5sums=('SKIP')
pkgver () {
cd "${srcdir}/${_gitname}"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
package() {
cd "$srcdir/$pkgname"
python2 setup.py install --root="$pkgdir/" --optimize=1
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 "resources/scenic-folder.svg" "$pkgdir/usr/share/${pkgname}/scenic-folder.svg"
}
# vim:set ts=2 sw=2 et:
Thank you, I would appreciate any help!
Bob aka balinbob-gmail.com
Offline
Also, namcap says the depends are not needed... I'm not sure why?
Namcap isn't good at scripts.
One more thing: I plan to remove the items which have no content, isn't that proper?
Yes, that would be recommended.
pkgname=scenic ... source=('git+https://github.com/balinbob/scenic')
This is the only big issue I see. If you're pulling from git master, the pkgname needs to end in "-git".
There are some formatting issues (newlines and braces), but those are minor.
Last edited by Scimmia (2016-12-16 13:26:53)
Online
@Scimmia
Thank you, that's good to hear. I have not done a proper release, but I had wondered whether I should not use -git. I will change it.
Offline
So I've used the PKGBUILD to install an icon and the LICENSE.
...
license=('GPL3')
For GPL3 you don't need to install a license file.
options=(!emptydirs)
Only minor, but since there are no empty dirs in the package after running the package() function (edit: without using !emptydirs), it's not needed.
Last edited by mis (2016-12-16 13:47:18)
Offline
Thank you @mis, I need to review the GPL licenses, to make sure this one is appropriate. I've used GPL2 before. I will take care of it.
Bob
Offline
_gitname is pointless, just use ${pkgname} or ${pkgname%-git}
I would also recycle variables, e.g.
pkgname=scenic-git
url="https://github.com/balinbob/${pkgname%-git}"
source=("git+${url}.git")
Also, optdepends should state the reason why each is desired. Does this integrate with those programs? Your pkgdesc suggests it is a frontend to image-processing programs in general. Quickly looking at the code suggests the user can use whatever programs they want set in a config file -- so they shouldn't be dependencies at all IMHO.
Defining whether emptydirs should be kept is only ever required when the package requires emptydirs to be installed -- otherwise there is no good reason to override the default (which is "!emptydirs" anyway).
...
Looking at your setup.py file, I have no clue why you can't get data files to install, mostly because I am not even going to try and decipher that archaic distutils mess full of irrelevant references.
Switch to setuptools. Clean up, major time. Use:
data_files=[
('share/scenic', ['resources/scenic-folder.svg'])
]
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
_gitname is pointless, just use ${pkgname} or ${pkgname%-git}
I would also recycle variables, e.g.pkgname=scenic-git url="https://github.com/balinbob/${pkgname%-git}" source=("git+${url}.git")
Both are personal opinions (style choices). I personally disagree with them; the only advantage is if those variables could change, which they shouldn't.
Online
Thanks, it is scenic-git in the AUR now, with corrections, and I'm still improving it. I have yet to remove (!emptydirs). Is there a way to remove or hide the original package ('scenic') ?
Bob
Offline
Use the AUR web interface to file a request to have it deleted.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Use the AUR web interface to file a request to have it deleted.
Thanks, I'm doing so now.
Bob
Offline
Eschwartz wrote:_gitname is pointless, just use ${pkgname} or ${pkgname%-git}
I would also recycle variables, e.g.pkgname=scenic-git url="https://github.com/balinbob/${pkgname%-git}" source=("git+${url}.git")
Both are personal opinions (style choices). I personally disagree with them; the only advantage is if those variables could change, which they shouldn't.
They do change, when I use one PKGBUILD as a template for another.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline