Patches for aports can be sent to this list

3 2

[alpine-aports] [PATCH] main/file: libmagic library moved to separate subpackage. minor APKBUILD cleanups

Valery Kartel
Details
Message ID
<1453303190-30557-1-git-send-email-valery.kartel@gmail.com>
Sender timestamp
1453303190
DKIM signature
missing
Download raw message
Patch: +12 -16
---
 main/file/APKBUILD | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/main/file/APKBUILD b/main/file/APKBUILD
index ceff2e6..6fdc2e5 100644
--- a/main/file/APKBUILD
+++ b/main/file/APKBUILD
@@ -1,32 +1,22 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=file
 pkgver=5.25
-pkgrel=0
+pkgrel=1
 pkgdesc="File type identification utility"
 url="http://www.darwinsys.com/file/"
 arch="all"
 license="BSD"
 depends=""
-source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz
-	"
-subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz"
 
-_builddir="$srcdir/$pkgname-$pkgver"
-prepare() {
-	cd "$_builddir"
-	update_config_sub || return 1
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
+subpackages="$pkgname-dev $pkgname-doc libmagic"
+
+_builddir="$srcdir"/$pkgname-$pkgver
 
 build() {
 	cd "$_builddir"
 	./configure \
-		--build=$CBUILD \
-		--host=$CHOST \
 		--prefix=/usr \
 		--datadir=/usr/share \
 		|| return 1
@@ -39,6 +29,12 @@ package() {
 	make DESTDIR="$pkgdir" install || return 1
 }
 
+libmagic() {
+	pkgdesc="File type identification library"
+	mkdir -p "$subpkgdir"/usr
+	mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr
+}
+
 md5sums="e6a972d4e10d9e76407a432f4a63cd4c  file-5.25.tar.gz"
 sha256sums="3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca  file-5.25.tar.gz"
 sha512sums="4a5176a7e80df2bb7e45916490433d22eb98a442d49d04146afcbdcf92ff619ea3e73e95c8991e6b6a0628efb9d127bfa4aafc1cae523f8261ca693bc5e13402  file-5.25.tar.gz"
-- 
2.7.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Timo Teras
Details
Message ID
<20160121084008.19689e2c@vostro>
In-Reply-To
<1453303190-30557-1-git-send-email-valery.kartel@gmail.com> (view parent)
Sender timestamp
1453358408
DKIM signature
missing
Download raw message
On Wed, 20 Jan 2016 17:19:50 +0200
Valery Kartel <valery.kartel@gmail.com> wrote:

> ---
>  main/file/APKBUILD | 28 ++++++++++++----------------
>  1 file changed, 12 insertions(+), 16 deletions(-)

Looks mostly good. There's one comment inline that needs changing.

Additionally, could you format the commit message so that the
first line of the commit message is a concise abbreviation, and
the explanation goes on lines 3+.

So for example on this commit, just:

main/file: split libmagic and cleanups

... would be sufficient. We usually don't use dots on the first line.

The main reason is that 'git shortlog' will show only the first line,
and it should not be too long. 'git log' will show the full commit log
and e.g. cgit formats it so that the first line is in bold, the line 2
is expected empty, and line 3+ is plain text.

Thanks.


> diff --git a/main/file/APKBUILD b/main/file/APKBUILD
> index ceff2e6..6fdc2e5 100644
> --- a/main/file/APKBUILD
> +++ b/main/file/APKBUILD
> @@ -1,32 +1,22 @@
> +# Contributor: Valery Kartel <valery.kartel@gmail.com>
>  # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
>  pkgname=file
>  pkgver=5.25
> -pkgrel=0
> +pkgrel=1
>  pkgdesc="File type identification utility"
>  url="http://www.darwinsys.com/file/"
>  arch="all"
>  license="BSD"
>  depends=""
> -source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz
> -	"
> -subpackages="$pkgname-dev $pkgname-doc"
> +source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz"
>  
> -_builddir="$srcdir/$pkgname-$pkgver"
> -prepare() {
> -	cd "$_builddir"
> -	update_config_sub || return 1
> -	for i in $source; do
> -		case $i in
> -		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return
> 1;;
> -		esac
> -	done
> -}
> +subpackages="$pkgname-dev $pkgname-doc libmagic"
> +
> +_builddir="$srcdir"/$pkgname-$pkgver
>  
>  build() {
>  	cd "$_builddir"
>  	./configure \
> -		--build=$CBUILD \
> -		--host=$CHOST \

Please don't remove --build and --host. They are needed for
bootstrapping new architectures. And if and when we want to support
cross-building.

>  		--prefix=/usr \
>  		--datadir=/usr/share \
>  		|| return 1
> @@ -39,6 +29,12 @@ package() {
>  	make DESTDIR="$pkgdir" install || return 1
>  }
>  
> +libmagic() {
> +	pkgdesc="File type identification library"
> +	mkdir -p "$subpkgdir"/usr
> +	mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr
> +}
> +
>  md5sums="e6a972d4e10d9e76407a432f4a63cd4c  file-5.25.tar.gz"
>  sha256sums="3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca
> file-5.25.tar.gz"
> sha512sums="4a5176a7e80df2bb7e45916490433d22eb98a442d49d04146afcbdcf92ff619ea3e73e95c8991e6b6a0628efb9d127bfa4aafc1cae523f8261ca693bc5e13402
> file-5.25.tar.gz"



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Valery Kartel
Details
Message ID
<CAKTwcDPegE2swjdmqSdzTLoseZEeNHSdDOHReWDCifpV4JwAiw@mail.gmail.com>
In-Reply-To
<20160121084008.19689e2c@vostro> (view parent)
Sender timestamp
1453361024
DKIM signature
missing
Download raw message
I remove --build & --host because ./configure knows nothing about
linux-musl system type.

I just made a patch, which follows the previous, that fix it.
21 січ. 2016 08:40 "Timo Teras" <timo.teras@iki.fi> пише:

> On Wed, 20 Jan 2016 17:19:50 +0200
> Valery Kartel <valery.kartel@gmail.com> wrote:
>
> > ---
> >  main/file/APKBUILD | 28 ++++++++++++----------------
> >  1 file changed, 12 insertions(+), 16 deletions(-)
>
> Looks mostly good. There's one comment inline that needs changing.
>
> Additionally, could you format the commit message so that the
> first line of the commit message is a concise abbreviation, and
> the explanation goes on lines 3+.
>
> So for example on this commit, just:
>
> main/file: split libmagic and cleanups
>
> ... would be sufficient. We usually don't use dots on the first line.
>
> The main reason is that 'git shortlog' will show only the first line,
> and it should not be too long. 'git log' will show the full commit log
> and e.g. cgit formats it so that the first line is in bold, the line 2
> is expected empty, and line 3+ is plain text.
>
> Thanks.
>
>
> > diff --git a/main/file/APKBUILD b/main/file/APKBUILD
> > index ceff2e6..6fdc2e5 100644
> > --- a/main/file/APKBUILD
> > +++ b/main/file/APKBUILD
> > @@ -1,32 +1,22 @@
> > +# Contributor: Valery Kartel <valery.kartel@gmail.com>
> >  # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
> >  pkgname=file
> >  pkgver=5.25
> > -pkgrel=0
> > +pkgrel=1
> >  pkgdesc="File type identification utility"
> >  url="http://www.darwinsys.com/file/"
> >  arch="all"
> >  license="BSD"
> >  depends=""
> > -source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz
> > -     "
> > -subpackages="$pkgname-dev $pkgname-doc"
> > +source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz"
> >
> > -_builddir="$srcdir/$pkgname-$pkgver"
> > -prepare() {
> > -     cd "$_builddir"
> > -     update_config_sub || return 1
> > -     for i in $source; do
> > -             case $i in
> > -             *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return
> > 1;;
> > -             esac
> > -     done
> > -}
> > +subpackages="$pkgname-dev $pkgname-doc libmagic"
> > +
> > +_builddir="$srcdir"/$pkgname-$pkgver
> >
> >  build() {
> >       cd "$_builddir"
> >       ./configure \
> > -             --build=$CBUILD \
> > -             --host=$CHOST \
>
> Please don't remove --build and --host. They are needed for
> bootstrapping new architectures. And if and when we want to support
> cross-building.
>
> >               --prefix=/usr \
> >               --datadir=/usr/share \
> >               || return 1
> > @@ -39,6 +29,12 @@ package() {
> >       make DESTDIR="$pkgdir" install || return 1
> >  }
> >
> > +libmagic() {
> > +     pkgdesc="File type identification library"
> > +     mkdir -p "$subpkgdir"/usr
> > +     mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr
> > +}
> > +
> >  md5sums="e6a972d4e10d9e76407a432f4a63cd4c  file-5.25.tar.gz"
> >
> sha256sums="3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca
> > file-5.25.tar.gz"
> >
> sha512sums="4a5176a7e80df2bb7e45916490433d22eb98a442d49d04146afcbdcf92ff619ea3e73e95c8991e6b6a0628efb9d127bfa4aafc1cae523f8261ca693bc5e13402
> > file-5.25.tar.gz"
>
>
Timo Teras
Details
Message ID
<20160121092521.48af45c1@vostro>
In-Reply-To
<CAKTwcDPegE2swjdmqSdzTLoseZEeNHSdDOHReWDCifpV4JwAiw@mail.gmail.com> (view parent)
Sender timestamp
1453361121
DKIM signature
missing
Download raw message
On Thu, 21 Jan 2016 09:23:44 +0200
Valery Kartel <valery.kartel@gmail.com> wrote:

> I remove --build & --host because ./configure knows nothing about
> linux-musl system type.
>
> I just made a patch, which follows the previous, that fix it.

Please fold them together.

If configure knows nothing about them, keep the update_config_sub
script in prepare(). It makes the autotools know about it :)

Thanks,
Timo

> 21 січ. 2016 08:40 "Timo Teras" <timo.teras@iki.fi> пише:
> 
> > On Wed, 20 Jan 2016 17:19:50 +0200
> > Valery Kartel <valery.kartel@gmail.com> wrote:
> >  
> > > ---
> > >  main/file/APKBUILD | 28 ++++++++++++----------------
> > >  1 file changed, 12 insertions(+), 16 deletions(-)  
> >
> > Looks mostly good. There's one comment inline that needs changing.
> >
> > Additionally, could you format the commit message so that the
> > first line of the commit message is a concise abbreviation, and
> > the explanation goes on lines 3+.
> >
> > So for example on this commit, just:
> >
> > main/file: split libmagic and cleanups
> >
> > ... would be sufficient. We usually don't use dots on the first
> > line.
> >
> > The main reason is that 'git shortlog' will show only the first
> > line, and it should not be too long. 'git log' will show the full
> > commit log and e.g. cgit formats it so that the first line is in
> > bold, the line 2 is expected empty, and line 3+ is plain text.
> >
> > Thanks.
> >
> >  
> > > diff --git a/main/file/APKBUILD b/main/file/APKBUILD
> > > index ceff2e6..6fdc2e5 100644
> > > --- a/main/file/APKBUILD
> > > +++ b/main/file/APKBUILD
> > > @@ -1,32 +1,22 @@
> > > +# Contributor: Valery Kartel <valery.kartel@gmail.com>
> > >  # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
> > >  pkgname=file
> > >  pkgver=5.25
> > > -pkgrel=0
> > > +pkgrel=1
> > >  pkgdesc="File type identification utility"
> > >  url="http://www.darwinsys.com/file/"
> > >  arch="all"
> > >  license="BSD"
> > >  depends=""
> > > -source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz
> > > -     "
> > > -subpackages="$pkgname-dev $pkgname-doc"
> > > +source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz"
> > >
> > > -_builddir="$srcdir/$pkgname-$pkgver"
> > > -prepare() {
> > > -     cd "$_builddir"
> > > -     update_config_sub || return 1
> > > -     for i in $source; do
> > > -             case $i in
> > > -             *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return
> > > 1;;
> > > -             esac
> > > -     done
> > > -}
> > > +subpackages="$pkgname-dev $pkgname-doc libmagic"
> > > +
> > > +_builddir="$srcdir"/$pkgname-$pkgver
> > >
> > >  build() {
> > >       cd "$_builddir"
> > >       ./configure \
> > > -             --build=$CBUILD \
> > > -             --host=$CHOST \  
> >
> > Please don't remove --build and --host. They are needed for
> > bootstrapping new architectures. And if and when we want to support
> > cross-building.
> >  
> > >               --prefix=/usr \
> > >               --datadir=/usr/share \
> > >               || return 1
> > > @@ -39,6 +29,12 @@ package() {
> > >       make DESTDIR="$pkgdir" install || return 1
> > >  }
> > >
> > > +libmagic() {
> > > +     pkgdesc="File type identification library"
> > > +     mkdir -p "$subpkgdir"/usr
> > > +     mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr
> > > +}
> > > +
> > >  md5sums="e6a972d4e10d9e76407a432f4a63cd4c  file-5.25.tar.gz"
> > >  
> > sha256sums="3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca  
> > > file-5.25.tar.gz"
> > >  
> > sha512sums="4a5176a7e80df2bb7e45916490433d22eb98a442d49d04146afcbdcf92ff619ea3e73e95c8991e6b6a0628efb9d127bfa4aafc1cae523f8261ca693bc5e13402  
> > > file-5.25.tar.gz"  
> >
> >  



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