Thanks for the git hooks, it will be very usefull !
]]>So you only need the PKGBUILD to copy over the MIT one (although adding both isn't harmful, just lacking in usefulness).
Thanks for fixing the remaining review comments. Please remember to update the .SRCINFO as well (you can do this with githooks e.g. https://github.com/eli-schwartz/aurpublish/#hooks)
]]>Checking if libgit2 is really required:
libgit2 is requried for the compilation and at the runtime, yes, so I have moved "libgit2" from "makedepends" to "depends" now.
But I keep it mind that can it be removed from the project in the next update.
Here the PKGBUILD updated :
pkgname=short-git
pkgver=0.3.2.r2.g58096a7
pkgrel=1
pkgdesc="A concise cli launcher / project manager using env files"
source=("${pkgname}::git+https://github.com/vincent-herlemont/short.git")
url="https://github.com/vincent-herlemont/short"
depends=('libgit2')
makedepends=('git' 'rust' 'cargo' 'openssl')
md5sums=('SKIP')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
license=('APACHE' 'MIT')
pkgver() {
cd ${pkgname};
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd ${pkgname};
cargo build --release --locked --features disabled_check_new_version
}
package() {
cd ${pkgname};
# sht binary:
install -Dm 755 target/release/sht -t "${pkgdir}/usr/bin"
# Licenses:
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m 644 LICENSE-APACHE \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-APACHE"
install -m 644 LICENSE-MIT \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT"
}
I run this commands for test :
$> namcap PKGBUILD
$> namcap short-git-0.3.2.r2.g58096a7-1-x86_64.pkg.tar.zst
Thanks so much, for your answers.
Here the final PKGBUILD file.
There is nothing final about this PKGBUILD! You asked for reviews, got some, and proceeded straight to posting what you're sure is the final version, but did you check to make sure the people you asked for review, agree? (The purpose of review is I assume to see if other people think it's ready for publication, so it's valuable to wait and see if they have any last insights...)
You haven't fixed all of loqs' review comments, and you implemented an incorrect license declaration that now needs to be fixed too. Please see https://wiki.archlinux.org/index.php/PKGBUILD#license
Please also remove the empty "provides=()" and "replaces=()" since they don't do anything.
]]>Checking PKGBUILD
PKGBUILD (short-git) W: Missing Maintainer tag
Checking short-git-0.3.2.r2.g58096a7-1-x86_64.pkg.tar.zst
short-git E: Apache-2.0 is not a common license (it's not in /usr/share/licenses/common/)
short-git E: Missing custom license directory (usr/share/licenses/short-git)
short-git E: Dependency libgit2 detected and not included (libraries ['usr/lib/libgit2.so.1.0'] needed in files ['usr/bin/sht'])
Checking if libgit2 is really required:
$ pacman -U short-git-0.3.2.r2.g58096a7-1-x86_64.pkg.tar.zst
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (1) short-git-0.3.2.r2.g58096a7-1
Total Installed Size: 3.26 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
:: Processing package changes...
(1/1) installing short-git [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
$ sht
sht: error while loading shared libraries: libgit2.so.1.0: cannot open shared object file: No such file or directory
Here the final PKGBUILD file.
pkgname=short-git
pkgver=0.3.2.r1.g451352e
pkgrel=1
pkgdesc="A concise cli launcher / project manager using env files"
source=("${pkgname}::git+https://github.com/vincent-herlemont/short.git")
url="https://github.com/vincent-herlemont/short"
makedepends=('git' 'rust' 'cargo' 'openssl' 'libgit2')
provides=()
replaces=()
md5sums=('SKIP')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
license=('Apache-2.0' 'MIT')
pkgver() {
cd ${pkgname};
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd ${pkgname};
cargo build --release --locked --features disabled_check_new_version
}
package() {
cd ${pkgname};
install -Dm 755 target/release/sht -t "${pkgdir}/usr/bin"
}
pkgname=short-git pkgver=v0.3.2.r0.g7f26b3d [...] pkgver() { cd ${pkgname}; git describe --long --tags | sed 's/^short-//;s/\([^-]*-g\)/r\1/;s/-/./g' }
Why does your pkgver() function remove the leading "short-" from the version, when there *isn't* a leading "short-"... instead of removing the leading "v"?
]]>Stefan Husmann wrote:You should cut away the leading "v" of the pkgver.
The version is generated by the pkgver() function as usual with SCM based packages.
Right, which is where it should be cut away.
]]>You should cut away the leading "v" of the pkgver.
The version is generated by the pkgver() function as usual with SCM based packages.
]]>Checking PKGBUILD
PKGBUILD (short-git) W: Missing Maintainer tag
PKGBUILD (short-git) E: Missing description in PKGBUILD
PKGBUILD (short-git) E: Missing url
PKGBUILD (short-git) E: Missing license
Checking short-git-v0.3.2.r0.g7f26b3d-1-x86_64.pkg.tar.zst
short-git E: Missing license
short-git E: Missing license
short-git E: Dependency libgit2 detected and not included (libraries ['usr/lib/libgit2.so.1.0'] needed in files ['usr/bin/sht'])
short it's command tool that allow to manage environment variables and launch script with them injected. Here the package : https://github.com/vincent-herlemont/short
It's the first time that I publish on the arch linux repository so the following PKGBUILD work but I don't know if I follow all the guidelines.
I have a specific question related to each steps (pkgver,build,package). It was in the wrong directory by default and I have to move with the command cd ${pkgname}; , it was normal ?
pkgname=short-git
pkgver=v0.3.2.r0.g7f26b3d
pkgrel=1
source=("${pkgname}::git+https://github.com/vincent-herlemont/short.git")
makedepends=('git' 'rust' 'cargo' 'openssl' 'libgit2')
provides=()
replaces=()
md5sums=('SKIP')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgver() {
cd ${pkgname};
git describe --long --tags | sed 's/^short-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd ${pkgname};
cargo build --release --locked --features disabled_check_new_version
}
package() {
cd ${pkgname};
install -Dm 755 target/release/sht -t "${pkgdir}/usr/bin"
}
Thank you for reading.
]]>