1

[alpine-aports] [PATCH] main/xz: Install license to /usr/share/licenses

Sören Tempel
Details
Message ID
<1445206890-17914-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1445206890
DKIM signature
missing
Download raw message
Patch: +19 -16
---
 main/xz/APKBUILD | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/main/xz/APKBUILD b/main/xz/APKBUILD
index 803bdc1..cb71a37 100644
--- a/main/xz/APKBUILD
+++ b/main/xz/APKBUILD
@@ -1,41 +1,44 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=xz
 pkgver=5.2.2
-pkgrel=0
+pkgrel=1
 pkgdesc="Library and command line tools for XZ and LZMA compressed files"
 url="http://tukaani.org/xz/"
 arch="all"
-license="GPL LGPL custom"
+license="custom"
 depends=""
 makedepends=""
 subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
 source="http://tukaani.org/xz/xz-$pkgver.tar.gz"
 
 _builddir="$srcdir"/$pkgname-$pkgver
-build () 
-{ 
-	cd $srcdir/$pkgname-$pkgver
+build () {
+	cd "$_builddir"
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
 		--disable-rpath \
 		--disable-werror \
 		|| return 1
-	sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-	sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-	make
-}
 
-package() {
-	cd "$_builddir"
-	make DESTDIR="$pkgdir" install || return 1
+	sed 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+		-i libtool || return 1
+	sed 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+		-i libtool || return 1
+
+	make || return 1
 }
 
-libs() {
-	pkgdesc="Libraries for decoding LZMA compression"
-	mkdir -p "$subpkgdir"/usr/lib
-	mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/
+package() {
+	make -C "$_builddir" DESTDIR="$pkgdir" install || return 1
+	install -Dm644 "$_builddir"/COPYING \
+		"$pkgdir"/usr/share/licenses/$pkgname || return 1
 }
 
 md5sums="7cf6a8544a7dae8e8106fdf7addfa28c  xz-5.2.2.tar.gz"
-- 
2.6.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20151021081448.07f7663d@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1445206890-17914-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1445408088
DKIM signature
missing
Download raw message
On Mon, 19 Oct 2015 00:21:30 +0200
Sören Tempel <soeren+git@soeren-tempel.net> wrote:

> ---
>  main/xz/APKBUILD | 35 +++++++++++++++++++----------------
>  1 file changed, 19 insertions(+), 16 deletions(-)
> 
> diff --git a/main/xz/APKBUILD b/main/xz/APKBUILD
> index 803bdc1..cb71a37 100644
> --- a/main/xz/APKBUILD
> +++ b/main/xz/APKBUILD
> @@ -1,41 +1,44 @@
> +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
>  # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
>  pkgname=xz
>  pkgver=5.2.2
> -pkgrel=0
> +pkgrel=1
>  pkgdesc="Library and command line tools for XZ and LZMA compressed files"
>  url="http://tukaani.org/xz/"
>  arch="all"
> -license="GPL LGPL custom"
> +license="custom"

I don't like the "custom" license really. Fedora says:
GPLv2+ and Public Domain

http://pkgs.fedoraproject.org/cgit/xz.git/tree/xz.spec#n12

Can't we use that instead?

As example, it is not very simple to figure out what license unrar has:
https://pkgs.alpinelinux.org/packages?name=unrar&repo=all&arch=x86_64&maintainer=all

>  depends=""
>  makedepends=""
>  subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
>  source="http://tukaani.org/xz/xz-$pkgver.tar.gz"
>  
>  _builddir="$srcdir"/$pkgname-$pkgver
> -build () 
> -{ 
> -	cd $srcdir/$pkgname-$pkgver
> +build () {
> +	cd "$_builddir"
>  	./configure \
>  		--build=$CBUILD \
>  		--host=$CHOST \
>  		--prefix=/usr \
> +		--sysconfdir=/etc \
> +		--mandir=/usr/share/man \
> +		--infodir=/usr/share/info \
> +		--localstatedir=/var \

I don't think xz has any info pages or use localstatedir so i think
adding those is pointless.

>  		--disable-rpath \
>  		--disable-werror \
>  		|| return 1
> -	sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
> -	sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
> -	make
> -}
>  
> -package() {
> -	cd "$_builddir"
> -	make DESTDIR="$pkgdir" install || return 1
> +	sed 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
> +		-i libtool || return 1
> +	sed 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
> +		-i libtool || return 1
> +
> +	make || return 1
>  }
>  
> -libs() {
> -	pkgdesc="Libraries for decoding LZMA compression"
> -	mkdir -p "$subpkgdir"/usr/lib
> -	mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/
> +package() {
> +	make -C "$_builddir" DESTDIR="$pkgdir" install || return 1
> +	install -Dm644 "$_builddir"/COPYING \
> +		"$pkgdir"/usr/share/licenses/$pkgname || return 1
>  }
>  
>  md5sums="7cf6a8544a7dae8e8106fdf7addfa28c  xz-5.2.2.tar.gz"



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---