You are not logged in.

#1 2016-11-05 17:51:37

kstn
Member
Registered: 2016-11-05
Posts: 4

PKGBUILD review request: html-xml-tools

Hi all.

Couldn't you check this PKGBUILD for mistakes?

# Maintainer: Konstantin Shakhnov <kastian at mail dot ru>
pkgname=html-xml-utils
pkgver=7.1
pkgrel=1
pkgdesc="A number of simple utilities for manipulating HTML and XML files."
arch=("i686" "x86_64")
url="https://www.w3.org/Tools/HTML-XML-utils/"
license=("custom")
depends=("curl" "libidn")
source=("https://www.w3.org/Tools/HTML-XML-utils/$pkgname-$pkgver.tar.gz")
md5sums=('3b30e2074de8665c82f4e503178c3efd')

build() {
    cd "$pkgname-$pkgver"
    ./configure --prefix=/usr
    make
}

check() {
    cd "$pkgname-$pkgver"
    make check
}

package() {
    cd "$pkgname-$pkgver"
    make DESTDIR="$pkgdir/" install
    install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}

Thanks for the help!

Offline

#2 2016-11-05 18:05:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: PKGBUILD review request: html-xml-tools

Well, it builds in a Clean Chroot as an extra package.  Good job -- most first attempts at a PKGBUILD fail when I try that.

Edit:  And welcome to the Arch Linux forums -- great first post big_smile

Last edited by ewaller (2016-11-05 18:06:21)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-11-06 03:35:14

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

Re: PKGBUILD review request: html-xml-tools

Is there a better url for the homepage? The current one appears to be a directory listing on the server. smile

Otherwise, it looks fine to me. As a style preference, I would leave a blank line between the Maintainer line and the main body of the PKGBUILD... also I would reuse "$url" in the sources array...

EDIT: Also, why use legacy md5 instead of, say, sha256? md5 suffices for file integrity, but sha256 gets you validation as well (or at least ensures other people get the same source code you used, which hopefully you checked and/or built yourself).

Last edited by eschwartz (2016-11-06 05:18:33)


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

Offline

#4 2016-11-06 05:09:58

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: PKGBUILD review request: html-xml-tools

The only thing I see is inconsistent use of braces on variables. That's really getting picky, though.

It does look good. On the style preferences Eschwartz mentioned, I also prefer the blank line, but do not prefer to reuse $url.

Offline

#5 2016-11-06 06:39:24

kstn
Member
Registered: 2016-11-05
Posts: 4

Re: PKGBUILD review request: html-xml-tools

# Maintainer: Konstantin Shakhnov <kastian at mail dot ru>

pkgname=html-xml-utils
pkgver=7.1
pkgrel=1
pkgdesc="A number of simple utilities for manipulating HTML and XML files."
arch=("i686" "x86_64")
url="https://www.w3.org/Tools/HTML-XML-utils/"
license=("custom")
depends=("curl" "libidn")
source=("https://www.w3.org/Tools/HTML-XML-utils/$pkgname-$pkgver.tar.gz")
sha256sums=("ec0efd2263b864bb7e0ae5c59f02c43c5d8aebd0e1c0d2bfce391e665766d56e")

build() {
	cd "$pkgname-$pkgver"
	./configure --prefix=/usr
	make
}

check() {
	cd "$pkgname-$pkgver"
	make check
}

package() {
	cd "$pkgname-$pkgver"
	make DESTDIR="$pkgdir/" install
	install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

@ewaller Thanks!

Eschwartz wrote:

Is there a better url for the homepage? The current one appears to be a directory listing on the server. smile

A page one level upper is a mess of links. A page two levels upper is too abstract. Seems that the page didn't change from first releases.

Eschwartz wrote:

As a style preference, I would leave a blank line between the Maintainer line and the main body of the PKGBUILD...

Scimmia wrote:

On the style preferences Eschwartz mentioned, I also prefer the blank line

Fixed, thanks. Mea culpa, was mistaken by /usr/share/pacman/PKGBUILD.proto

Eschwartz wrote:

EDIT: Also, why use legacy md5 instead of, say, sha256? md5 suffices for file integrity, but sha256 gets you validation as well (or at least ensures other people get the same source code you used, which hopefully you checked and/or built yourself).

Fixed, thanks. Same trouble - too much looking at proto, too less thinking.

Scimmia wrote:

The only thing I see is inconsistent use of braces on variables.

Also fixed.

Offline

Board footer

Powered by FluxBB