You are not logged in.
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 
 (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
Looks fine to me...although I believe the <code>md5sum</code> value is supposed to be in quotes:
md5sum=('d34ab5b24ea6aa9eb9cf0eff53f05102')Offline
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
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
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
Hot damn tomk is the packaging master! Note to self: learn more about compiling stuff by hand...
Offline
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 
 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
This looks great 
 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
Also for future reference you can use options=('NOLIBTOOL') to replace using find $startdir/pkg -name '*.la' -exec rm {} ;
Offline
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
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
: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
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
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
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