You are not logged in.

#1 2006-04-24 21:53:23

eddy
Member
Registered: 2005-07-11
Posts: 85

libmpt: PKGBUILD for peer review [now in AUR]

Hi there
--Please move if not in right place--
This the first package  that i have made, and am looking for some feedback if it is good enough for aur submission. The package is libmtp, which is used to access and transfer files from a mp3 player that requires 'play for sure' from M$.

# Contributor: Kev
pkgname=libmtp
pkgver=0.0.3
pkgrel=1
pkgdesc="library to make use of mtp"
url="http://libmtp.sourceforge.net"
depends=()
source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz) 
md5sum=(d34ab5b24ea6aa9eb9cf0eff53f05102)

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure
  make || return 1
  make DESTDIR=$startdir/pkg install
}

Configure with --prefix= for safety wink (not liable for any damage)
Otherwise i can say that it works with my zen microphoto. I can copy files to and from it from cui.
What do you guys think of it?
Cheers[/code]


Anyone who has never made a mistake has never tried anything new (Albert Einstein)
Specs PC:   P4,2.8GHz,HT;1GB DDR;ATI Radeon 9800Pro 128Mb
          Laptop:PM, 1.5GHz;512DDR;ATI Mobility Radeon 9700 64Mb

Offline

#2 2006-04-24 22:10:40

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: libmpt: PKGBUILD for peer review [now in AUR]

Looks fine to me...although I believe the <code>md5sum</code> value is supposed to be in quotes:

md5sum=('d34ab5b24ea6aa9eb9cf0eff53f05102')

Offline

#3 2006-04-24 22:33:17

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: libmpt: PKGBUILD for peer review [now in AUR]

moved to making packages.

The md5sum doesn't have to be in quotes but it is good practice to do so with all array values in the PKGBUILD. Especially in depends() where you could have a dep as foo>=1.0. The `>=' will screw with bash if not put in quotes.

Offline

#4 2006-04-24 23:17:24

eddy
Member
Registered: 2005-07-11
Posts: 85

Re: libmpt: PKGBUILD for peer review [now in AUR]

Thx for the advice and explanation for the '. Will add the ' to the md5sum.
cheers


Anyone who has never made a mistake has never tried anything new (Albert Einstein)
Specs PC:   P4,2.8GHz,HT;1GB DDR;ATI Radeon 9800Pro 128Mb
          Laptop:PM, 1.5GHz;512DDR;ATI Mobility Radeon 9700 64Mb

Offline

#5 2006-04-24 23:25:09

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: libmpt: PKGBUILD for peer review [now in AUR]

eddy wrote:

Configure with --prefix= for safety

I'm not sure what you mean by that, but you have to use --prefix=/usr - if you don't, it will install to /usr/local, which is not permitted.

A few more things:
- it's md5sums, even if there's only one.
- libmtp depends on libusb, just like libgphoto2. namcap told me that.
- a libmtp.la libtool file is created, which is not required, as Arch got rid of libtool a good while ago, so you need the libtool-slay command at the end of your build:

find $startdir/pkg -name '*.la' -exec rm {} ;

Offline

#6 2006-04-25 00:59:45

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: libmpt: PKGBUILD for peer review [now in AUR]

Hot damn tomk is the packaging master!  Note to self: learn more about compiling stuff by hand...

Offline

#7 2006-04-25 01:00:26

eddy
Member
Registered: 2005-07-11
Posts: 85

Re: libmpt: PKGBUILD for peer review [now in AUR]

thx tomk
i meant with that to install to another direcectory so that one could see what it installed; eg. --prefix=home/foo
were foo is any directory you want.(was not that clear i agree)
Thx for the namcap hint big_smile I had libusb library already installed before.

a libmtp.la libtool file is created, which is not required, as Arch got rid of libtool a good while ago, so you need the libtool-slay command at the end of your build

=>Will add that.
Really apreciate the help
Cheers


Anyone who has never made a mistake has never tried anything new (Albert Einstein)
Specs PC:   P4,2.8GHz,HT;1GB DDR;ATI Radeon 9800Pro 128Mb
          Laptop:PM, 1.5GHz;512DDR;ATI Mobility Radeon 9700 64Mb

Offline

#8 2006-04-25 03:26:57

eddy
Member
Registered: 2005-07-11
Posts: 85

Re: libmpt: PKGBUILD for peer review [now in AUR]

This looks great big_smile So here is my final PKGBUILD. I will post this when i get up to the aur, if there are no more comments/suggestions that are made.(might add maintainer and email but will do that when i wake up and have read the aur submission guidelines).

#Contributor: Kev
pkgname=libmtp
pkgver=0.0.3
pkgrel=1
pkgdesc="library to make use of mtp"
url="http://libmtp.sourceforge.net"
depends=(libusb)
source=(http://dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz) 
md5sums=('d34ab5b24ea6aa9eb9cf0eff53f05102')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install
  find $startdir/pkg -name '*.la' -exec rm {} ;
}

Thanks for you guys help.
Cheers


Anyone who has never made a mistake has never tried anything new (Albert Einstein)
Specs PC:   P4,2.8GHz,HT;1GB DDR;ATI Radeon 9800Pro 128Mb
          Laptop:PM, 1.5GHz;512DDR;ATI Mobility Radeon 9700 64Mb

Offline

#9 2006-04-25 03:34:48

WillySilly
Member
Registered: 2005-01-14
Posts: 268

Re: libmpt: PKGBUILD for peer review [now in AUR]

Also for future reference you can use options=('NOLIBTOOL') to replace using find $startdir/pkg -name '*.la' -exec rm {} ;

Offline

#10 2006-04-25 04:49:15

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: libmpt: PKGBUILD for peer review [now in AUR]

WillySilly wrote:

Also for future reference you can use options=('NOLIBTOOL') to replace using find $startdir/pkg -name '*.la' -exec rm {} ;

Wow!  I didn't know that...is it documented anywhere (it doesn't appear to be on the ABS entry of the wiki)?  Any other cool options aside from 'NOLIBTOOL'?

Offline

#11 2006-04-25 06:18:59

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: libmpt: PKGBUILD for peer review [now in AUR]

options=('NOLIBTOOL') is not documented anywhere yet, elasticdog, and in particular not in the makepkg man page, with the other options= - that's why I did not suggest it.

Offline

#12 2006-04-25 20:25:48

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: libmpt: PKGBUILD for peer review [now in AUR]

:oops:  Hmmm...never noticed the options section of the man page before.  Although it's true that the 'NOLIBTOOL' option isn't listed there.

options
              This  array  allows  you  to  override   some   of
              makepkg's  default  behaviour  when building pack-
              ages.  To set an option, just include  the  option
              name in the options array.

                            Available Options:

                     FORCE  force  the package to be upgraded by
                            --sysupgrade, even if its  an  older
                            version.

                     KEEPDOCS
                            do  not  remove  /usr/share/doc  and
                            /usr/share/info directories.

                     NOSTRIP
                            do not strip debugging symbols  from
                            binaries and libraries.

Offline

#13 2006-04-26 00:31:24

eddy
Member
Registered: 2005-07-11
Posts: 85

Re: libmpt: PKGBUILD for peer review [now in AUR]

Thx WillySilly
I have used tomk's method for this one, but will take your method into consideration for some other time.
Cheers


Anyone who has never made a mistake has never tried anything new (Albert Einstein)
Specs PC:   P4,2.8GHz,HT;1GB DDR;ATI Radeon 9800Pro 128Mb
          Laptop:PM, 1.5GHz;512DDR;ATI Mobility Radeon 9700 64Mb

Offline

#14 2006-04-26 05:24:51

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: libmpt: PKGBUILD for peer review [now in AUR]

tomk wrote:

options=('NOLIBTOOL') is not documented anywhere yet, elasticdog, and in particular not in the makepkg man page, with the other options= - that's why I did not suggest it.

Shouldn't we add options=('NOLIBTOOL') as a default option to /etc/makepkg.conf?

Offline

#15 2006-04-26 05:28:23

WillySilly
Member
Registered: 2005-01-14
Posts: 268

Re: libmpt: PKGBUILD for peer review [now in AUR]

AndyRTR wrote:
tomk wrote:

options=('NOLIBTOOL') is not documented anywhere yet, elasticdog, and in particular not in the makepkg man page, with the other options= - that's why I did not suggest it.

Shouldn't we add options=('NOLIBTOOL') as a default option to /etc/makepkg.conf?

No, many things like KDE and other packages still need the .la files. The PKGBUILD option is best IMHO.

Offline

Board footer

Powered by FluxBB