You are not logged in.

#1 2017-07-26 20:48:38

buttcake
Member
Registered: 2016-10-16
Posts: 37

[Solved] lchat, libutf PKGBUILD files

https://github.com/younix/lchat

lchat is a simple cli frontend for ii or chat programs similar to ii like jj, ratox or sj

Thanks in advance.

Last edited by buttcake (2017-07-27 22:01:57)

Offline

#2 2017-07-27 12:28:36

buttcake
Member
Registered: 2016-10-16
Posts: 37

Re: [Solved] lchat, libutf PKGBUILD files

Ok, so I made a pkgbuild for one of it's dependencies before makeing a PKGBUILD on lchat and I'm kind of stuck.

pkgname=libutf
pkgver=r21.b1a530d
pkgrel=1
pkgdesc="a C89 UTF-8 library, with an API compatible with that of Plan 9's libutf"
arch=('i686' 'x86_64')
url="http://git.suckless.org/libutf/log/"
license=('MIT')
makedepends=('git')
provides=("$pkgname")
conflicts=("$pkgname")
source=("git://git.suckless.org/libutf")
sha256sums=('SKIP')

pkgver() {
        cd "$srcdir/${pkgname}"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
        cd "$srcdir/${pkgname}"
        make DESTDIR="$pkgdir/" PREFIX="/usr" install
}

lchat doesn't seem to have an install in the makefile. What should I do there ?

Last edited by buttcake (2017-07-27 14:06:50)

Offline

#3 2017-07-27 15:59:34

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] lchat, libutf PKGBUILD files

You use `install -Dm755 $thebinary "$pkgdir"/usr/bin/$thebinary`, then report an issue/file a PR for the upstream project to add an install target to their Makefile.

While you're at it, you could also ask them to respect CFLAGS properly, and look at LDFLAGS in the first place...
I don't know why it is so stylish to ignore the standard Make rules and reimplement them badly... they could simply delete every rule there and just use
"lchat: lchat.o slackline.o" lines to define dependencies and the builtin GNU Make rules would do everything properly.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2017-07-27 22:01:19

buttcake
Member
Registered: 2016-10-16
Posts: 37

Re: [Solved] lchat, libutf PKGBUILD files

Thank you for the help.

pkgname=lchat
pkgver=r59.25d90f4
pkgrel=1
pkgdesc="a simple and elegant front end for ii-like chat programs"
arch=('i686' 'x86_64')
url="https://github.com/younix/lchat"
license=('unknown')
depends=('libutf')
makedepends=('git')
provides=("$pkgname")
conflicts=("$pkgname")
source=("git://github.com/younix/lchat.git")
sha256sums=('SKIP')

pkgver() {
        cd "$srcdir/${pkgname}"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
        cd "$srcdir/${pkgname}"
        make
        install -Dm755 lchat "${pkgdir}/usr/bin/lchat"
        install -D lchat.1 "${pkgdir}/usr/share/man/man1/lchat.1"
}

I won't submit these to aur because I don't want to maintain them but if anyone finds these and thinks they are actually needed feel free to take them over.

Offline

#5 2017-07-27 23:27:01

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] lchat, libutf PKGBUILD files

It's also worth pointing out that `make` should be run during `build()` as opposed to `package()`, the MIT license needs to be installed to "$pkgdir/usr/share/licenses/$pkgname/LICENSE", and git repositories should be cloned over https:// rather than git:// since that will check the SSL certificate for the connection.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2017-07-28 19:45:47

buttcake
Member
Registered: 2016-10-16
Posts: 37

Re: [Solved] lchat, libutf PKGBUILD files

This is still solved, I'm just posting the final versions as per Eschwartz guidance.

pkgname=libutf
pkgver=r21.b1a530d
pkgrel=1
pkgdesc="a C89 UTF-8 library, with an API compatible with that of Plan 9's libutf"
arch=('i686' 'x86_64')
url="http://git.suckless.org/libutf/log/"
license=('MIT')
makedepends=('git')
provides=("$pkgname")
conflicts=("$pkgname")
source=("git://git.suckless.org/libutf")
sha256sums=('SKIP')

pkgver() {
        cd "$srcdir/${pkgname}"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
        cd "$srcdir/${pkgname}"
        make DESTDIR="$pkgdir/" PREFIX="/usr" install
        install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}
pkgname=lchat
pkgver=r59.25d90f4
pkgrel=1
pkgdesc="a simple and elegant front end for ii-like chat programs"
arch=('i686' 'x86_64')
url="https://github.com/younix/lchat"
license=('unknown')
depends=('libutf')
makedepends=('git')
provides=("$pkgname")
conflicts=("$pkgname")
source=("git+https://github.com/younix/lchat.git")
sha256sums=('SKIP')

pkgver() {
        cd "$srcdir/${pkgname}"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build(){
        cd "$srcdir/${pkgname}"
        make
}
package() {
        cd "$srcdir/${pkgname}"
        install -Dm 755 lchat "${pkgdir}/usr/bin/lchat"
        install -D lchat.1 "${pkgdir}/usr/share/man/man1/lchat.1"
}

Offline

Board footer

Powered by FluxBB