You are not logged in.
Hi I am trying to create my first package and I need some help.
When I run makepkg I get:
mkdir: cannot create directory ‘/usr/bin/kitty’: Permission denied
I guess I didn't understood the process - here is my work so far:
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Maximilian Kindshofer <maximilian@kindshofer.net>
pkgname=kitty
pkgver=1
pkgrel=1
arch=('i368' 'x86_64')
url="https://github.com/kovidgoyal/kitty"
license=('GPL-3')
depends=('python3' 'glew' 'freetype2' 'fontconfig' 'xorg-xdpyinfo')
makedepends=('git' 'gcc' 'pkg-config')
source=('git+https://github.com/kovidgoyal/kitty.git')
md5sums=('SKIP')
build() {
cd "$pkgname"
python3 setup.py linux-package
}
package() {
cd "${srcdir}/${pkgname}/linux-package"
mkdir /usr/bin/$pkgname
cp bin/* /usr/bin/$pkgname -R
cp share /usr/share/$pkgname -R
cp lib /usr/lib/$pkgname -R
}
The package build corretly now I try to move the files to the directories...
Last edited by ramirezterrix (2017-01-10 15:47:06)
Offline
You need to put the files in the $pkgdir prefix, not the live system root.
See https://wiki.archlinux.org/index.php/Cr … kage.28.29
EDIT: Why are you making a directory in /usr/bin anyway?
Last edited by WorMzy (2017-01-09 12:49:41)
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
Yeah I made the directory because I got it totally wrong
Offline
Just take a look at good PKGBUILD for python apps: http://pkgbuild.com/~arojas/PKGBUILD
But...
pkgname, pkgver should be compatible with: https://wiki.archlinux.org/index.php/VC … guidelines
Offline
Ok i looked at some packages and it made me somehow more confused.
After building the pkg I have a folder called linux-package in my $srcdir
inside there is are folders called /bin /share and /lib I somehow want to copy them to $pkgdir/usr/bin/$pkgname $pkgdir/usr/share/$pkgname and $pkgdir/usr/lib/$packagename
I tried install -D -m755 for the file in bin and it worked, but it doesnt work on the other folders since they containe more than one file and subfolders.
Every package I looked at does is diffrently.
Offline
After building the pkg I have a folder called linux-package in my $srcdir
Yes, because you execute:
python3 setup.py linux-package
This directory isn't in $srcdir, but in $srcdir/kitty/
inside there is are folders called /bin /share and /lib I somehow want to copy them to $pkgdir/usr/bin/$pkgname $pkgdir/usr/share/$pkgname and $pkgdir/usr/lib/$packagename
No! This directory structure is coresponding to linux directory structure. File in $srcdir/kitty/linux-package/bin/ should be placed (after package installation) in /usr/bin/ not in /usr/bin/kitty/. Files and - maybe - directories in /share shoud be placed in /usr/share/ etc. Of course all of them should be packed to $pkgdir/something/.
I tried install -D -m755 for the file in bin and it worked, but it doesnt work on the other folders since they containe more than one file and subfolders.
Every package I looked at does is diffrently.
Packages does in different way because of sources and Makefiles etc.
Ok, there is PKGBUILD for kitty-git
pkgname=kitty-git # *-git, because kitty has not versioned ye
pkgver=r669.8e565d5 # see pkgver section
pkgrel=1
pkgdesc="A modern, hackable, featureful, OpenGL based terminal emulator" # you've missed pkgdesc which is neccessary
arch=('i686' 'x86_64')
url="https://github.com/kovidgoyal/kitty"
license=('GPL3') # GPL-3 isn't common license, but GPL3 is
depends=('python3' 'glew' 'glfw-x11' 'freetype2') # you've missed glfw-x11 dependencies
makedepends=('git' 'pkg-config' 'python-setuptools') # I'm not shure, that python-setuptools is neccessary
source=('git+https://github.com/kovidgoyal/kitty.git')
md5sums=('SKIP')
#pkgver section because of [url]https://wiki.archlinux.org/index.php/VCS_package_guidelines[/url]
pkgver() {
cd kitty
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/kitty" # there is wrong location in your version
python3 setup.py linux-package
}
# all section are changed because it's completly wrong in your PKGBUILD
package() {
cd "$srcdir/kitty/linux-package"
mkdir -p $pkgdir/usr/bin/
mkdir -p $pkgdir/usr/lib/
mkdir -p $pkgdir/usr/share
cp -r bin/* $pkgdir/usr/bin
cp -r share/* $pkgdir/usr/share/
cp -r lib/* $pkgdir/usr/lib/
}
Maybe package section should be cleared... but it works.
python3 install not works with kitty (I don't know why).
Comments are after "#".
Last edited by pb (2017-01-09 22:53:25)
Offline
Just take a look at good PKGBUILD for python apps: http://pkgbuild.com/~arojas/PKGBUILD
But...
pkgname, pkgver should be compatible with: https://wiki.archlinux.org/index.php/VC … guidelines
That would help a lot, if only the setup.py would use setuptools...
setup.py is a recognizable filename, which is probably why it was used, but in this case does not imply you can copy-paste any old setuptools-based PKGBUILD.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks for the explanation and for your time!
Offline
Clear up PKGBUILD: https://aur.archlinux.org/cgit/aur.git/ … =kitty-git - pkgdesc line
Offline