You are not logged in.
Pages: 1
Hi,
I used the prototype from the wiki page concerning Arch packaging standards and made a PKGBUILD
for the "Speech Signal Processing Toolkit" (SPTK), because I did not find an existing package for it
in either the normal repositories or the AUR.
After running namcap on both the PKGBUILD and the tarball made by makepkg --source I believe the
package to be ready for uploading to the AUR, but since this is the first time I created one, I wanted
to be sure about that, before I end up uploading something that isn't and people can't use it.
That is why I post the PKGBUILD here and link the tarball , to get confirmation about it
being ready for uploading.
Thankful in advance,
-- Moritz
PS: I removed the "src" substring from the filename generated by makepkg --source, because I have
never seen it before in other AUR package tarballs
PPS: I have only tried it on i686 since I have no 64 bit Archlinux installs, it would be very nice if someone
with such a system could try to build it and tell me whether it works.
This is the PKGBUILD:
# Maintainer: Moritz Maxeiner <moritzmaxeiner@googlemail.com>
pkgname=sptk
pkgver=3.4.1
pkgrel=1
pkgdesc="A suite of speech signal processing tools."
arch=('i686' 'x68_64')
url="http://sourceforge.net/projects/sp-tk/files/"
license=('BSD')
depends=('libx11')
conflicts=('boost')
source=(http://downloads.sourceforge.net/sp-tk/${pkgname^^}-$pkgver.tar.gz)
md5sums=('42615c62edcc0e1df5a83535d0b074f2')
build() {
cd "$srcdir/${pkgname^^}-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/${pkgname^^}-$pkgver"
make prefix="$pkgdir"/usr install
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
EDIT: Changed $(echo $pkgname | tr '[a-z]' '[A-Z]') to ${pkgname^^}. Thanks to lolilolicon
EDIT2: Added conflict with boost, thanks to Stefan Husmann
EDIT3: Circumvented the "make DESTDIR=xxx install" problem by using "make prefix=xxx install" instead and removec provide.
Last edited by Calrama (2011-10-16 20:05:41)
Offline
Looks fine, except for that echo | tr stuff, which is ugly and unnecessary IMO.
Offline
tr '[a-z]' '[A-Z]' is bad in two ways: 1) You don't add brackets around a range for `tr', i.e., use tr a-z A-Z. 2) What set of characters a-z or A-Z specifies is subject to locale settings, when you really want to use it like this, set environment LC_ALL=C.
I recommend either using a _pkgname=SPTK, or ${pkgname^^} which I believe is locale-independant.
Last edited by lolilolicon (2011-10-14 13:20:53)
This silver ladybug at line 28...
Offline
Thanks, tomk, it is ugly yes, but not unnecessary afaik, because while the package name is in lower case, the source tarball from
their website is in upper case. If I leave the tr stuff out, makepkg will not be able to download the package.
The only other options I see is to either
1) make the package name upper case (violation),
2) Use a custom variable (violation as well) or
3) Hardcode the source tarball name without use of a variable (second best after the tr method, but still... ).
Neither of these is rather appealing to me, so if you know another way, please tell me, I do found the tr way simply
the lesser of the 4 evils..
EDIT:
Thanks lolilolicon, got the tr version from google, will try your second suggestion now.
Last edited by Calrama (2011-10-14 13:35:39)
Offline
${pkgname^^} works fine and looks better as well, thank you lolilolicon, updated PKGBUILD in first post.
Offline
Hardcoding is the obvious solution IMO.
3) Hardcode the source tarball name without use of a variable (second best after the tr method, but still... ).
Still what? The source tarball name is unlikely to change, after all.
Offline
Can someone reproduce this:
tar tfv /home/haawda/repo/sptk-3.4.1-1-x86_64.pkg.tar.xz
-rw-r--r-- root/root 501 2011-10-14 17:38 .PKGINFO
drwxr-xr-x root/root 0 2011-10-14 17:38 home/
drwxr-xr-x root/root 0 2011-10-14 17:38 home/haawda/
drwxr-xr-x root/root 0 2011-10-14 17:38 home/haawda/paketierung/
drwxr-xr-x root/root 0 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/
drwxr-xr-x root/root 0 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/
drwxr-xr-x root/root 0 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/
drwxr-xr-x root/root 0 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/
drwxr-xr-x root/root 0 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/
-rw-r--r-- root/root 14997 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.5to2up
-rw-r--r-- root/root 9415 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.5to8
-rw-r--r-- root/root 785 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.5to2dn
-rw-r--r-- root/root 13535 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.2to3f
-rw-r--r-- root/root 8135 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.3to4
-rw-r--r-- root/root 3003 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.3to2
-rw-r--r-- root/root 2287 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.2to3s
-rw-r--r-- root/root 15333 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.4to3
-rw-r--r-- root/root 2657 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.5to7
-rw-r--r-- root/root 4535 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.4to5
-rw-r--r-- root/root 15037 2011-10-14 17:38 home/haawda/paketierung/not_maintained_by_me/sptk/pkg/usr/lib/lpfcoef.2to1
drwxr-xr-x root/root 0 2011-10-14 17:38 usr/
drwxr-xr-x root/root 0 2011-10-14 17:38 usr/share/
drwxr-xr-x root/root 0 2011-10-14 17:38 usr/include/
drwxr-xr-x root/root 0 2011-10-14 17:38 usr/lib/
drwxr-xr-x root/root 0 2011-10-14 17:38 usr/bin/
-rwxr-xr-x root/root 8904 2011-10-14 17:38 usr/bin/ulaw
-rwxr-xr-x root/root 12712 2011-10-14 17:38 usr/bin/minmax
-rwxr-xr-x root/root 12504 2011-10-14 17:38 usr/bin/gmmp
-rwxr-xr-x root/root 8840 2011-10-14 17:38 usr/bin/cdist
-rwxr-xr-x root/root 8072 2011-10-14 17:38 usr/bin/par2lpc
-rwxr-xr-x root/root 12141 2011-10-14 17:38 usr/bin/wav2raw.sh
-rwxr-xr-x root/root 8104 2011-10-14 17:38 usr/bin/interpolate
-rwxr-xr-x root/root 17192 2011-10-14 17:38 usr/bin/mlpg
-rwxr-xr-x root/root 10904 2011-10-14 17:38 usr/bin/lspdf
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/raw2wav -> raw2wav.sh
-rwxr-xr-x root/root 7512 2011-10-14 17:38 usr/bin/impulse
-rwxr-xr-x root/root 10918 2011-10-14 17:38 usr/bin/glogsp.sh
-rwxr-xr-x root/root 28920 2011-10-14 17:38 usr/bin/fig
-rwxr-xr-x root/root 10000 2011-10-14 17:38 usr/bin/bcut
-rwxr-xr-x root/root 23632 2011-10-14 17:38 usr/bin/smcep
-rwxr-xr-x root/root 9712 2011-10-14 17:38 usr/bin/excite
-rwxr-xr-x root/root 7992 2011-10-14 17:38 usr/bin/extract
-rwxr-xr-x root/root 4544 2011-10-14 17:38 usr/bin/bell.sh
-rwxr-xr-x root/root 15008 2011-10-14 17:38 usr/bin/lbg
-rwxr-xr-x root/root 12152 2011-10-14 17:38 usr/bin/delta
-rwxr-xr-x root/root 8064 2011-10-14 17:38 usr/bin/b2mc
-rwxr-xr-x root/root 22984 2011-10-14 17:38 usr/bin/xgr
-rwxr-xr-x root/root 8904 2011-10-14 17:38 usr/bin/ignorm
-rwxr-xr-x root/root 24104 2011-10-14 17:38 usr/bin/x2x
-rwxr-xr-x root/root 10880 2011-10-14 17:38 usr/bin/ds
-rwxr-xr-x root/root 8112 2011-10-14 17:38 usr/bin/clip
-rwxr-xr-x root/root 16049 2011-10-14 17:38 usr/bin/da.sh
-rwxr-xr-x root/root 12104 2011-10-14 17:38 usr/bin/phase
-rwxr-xr-x root/root 10920 2011-10-14 17:38 usr/bin/vopr
-rwxr-xr-x root/root 23520 2011-10-14 17:38 usr/bin/mgcep
-rwxr-xr-x root/root 10904 2011-10-14 17:38 usr/bin/lsp2lpc
-rwxr-xr-x root/root 11552 2011-10-14 17:38 usr/bin/ifft2
-rwxr-xr-x root/root 12896 2011-10-14 17:38 usr/bin/bcp
-rwxr-xr-x root/root 8582 2011-10-14 17:38 usr/bin/uscd.sh
-rwxr-xr-x root/root 11752 2011-10-14 17:38 usr/bin/idct
-rwxr-xr-x root/root 12992 2011-10-14 17:38 usr/bin/acep
-rwxr-xr-x root/root 15320 2011-10-14 17:38 usr/bin/sopr
-rwxr-xr-x root/root 11696 2011-10-14 17:38 usr/bin/dmp
-rwxr-xr-x root/root 7688 2011-10-14 17:38 usr/bin/rawtowav
-rwxr-xr-x root/root 6565 2011-10-14 17:38 usr/bin/us16.sh
-rwxr-xr-x root/root 12072 2011-10-14 17:38 usr/bin/c2sp
-rwxr-xr-x root/root 15800 2011-10-14 17:38 usr/bin/pitch
-rwxr-xr-x root/root 8376 2011-10-14 17:38 usr/bin/train
-rwxr-xr-x root/root 10016 2011-10-14 17:38 usr/bin/ifft
-rwxr-xr-x root/root 11800 2011-10-14 17:38 usr/bin/fftr
-rwxr-xr-x root/root 6728 2011-10-14 17:38 usr/bin/cat2
-rwxr-xr-x root/root 11688 2011-10-14 17:38 usr/bin/root_pol
-rwxr-xr-x root/root 15744 2011-10-14 17:38 usr/bin/mglsadf
-rwxr-xr-x root/root 10880 2011-10-14 17:38 usr/bin/us
-rwxr-xr-x root/root 9120 2011-10-14 17:38 usr/bin/dfs
-rwxr-xr-x root/root 8024 2011-10-14 17:38 usr/bin/vsum
-rwxr-xr-x root/root 15904 2011-10-14 17:38 usr/bin/glsadf
-rwxr-xr-x root/root 16040 2011-10-14 17:38 usr/bin/mgc2sp
-rwxr-xr-x root/root 15032 2011-10-14 17:38 usr/bin/agcep
-rwxr-xr-x root/root 8360 2011-10-14 17:38 usr/bin/lpc2c
-rwxr-xr-x root/root 21896 2011-10-14 17:38 usr/bin/gmm
-rwxr-xr-x root/root 10888 2011-10-14 17:38 usr/bin/c2acr
-rwxr-xr-x root/root 7976 2011-10-14 17:38 usr/bin/acorr
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/glogsp -> glogsp.sh
-rwxr-xr-x root/root 9048 2011-10-14 17:38 usr/bin/ltcdf
-rwxr-xr-x root/root 7856 2011-10-14 17:38 usr/bin/sin
-rwxr-xr-x root/root 8792 2011-10-14 17:38 usr/bin/nrand
-rwxr-xr-x root/root 15160 2011-10-14 17:38 usr/bin/vstat
-rwxr-xr-x root/root 7808 2011-10-14 17:38 usr/bin/norm0
-rwxr-xr-x root/root 9248 2011-10-14 17:38 usr/bin/imsvq
-rwxr-xr-x root/root 8256 2011-10-14 17:38 usr/bin/ramp
-rwxr-xr-x root/root 5672 2011-10-14 17:38 usr/bin/echo2
-rwxr-xr-x root/root 10482 2011-10-14 17:38 usr/bin/gwave.sh
-rwxr-xr-x root/root 9336 2011-10-14 17:38 usr/bin/lpc2par
-rwxr-xr-x root/root 9200 2011-10-14 17:38 usr/bin/histogram
-rwxr-xr-x root/root 7824 2011-10-14 17:38 usr/bin/nan
-rwxr-xr-x root/root 8400 2011-10-14 17:38 usr/bin/average
-rwxr-xr-x root/root 12248 2011-10-14 17:38 usr/bin/mlsadf
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/da -> da.sh
-rwxr-xr-x root/root 8872 2011-10-14 17:38 usr/bin/gnorm
-rwxr-xr-x root/root 10896 2011-10-14 17:38 usr/bin/swab
-rwxr-xr-x root/root 8576 2011-10-14 17:38 usr/bin/ivq
-rwxr-xr-x root/root 10904 2011-10-14 17:38 usr/bin/window
-rwxr-xr-x root/root 13144 2011-10-14 17:38 usr/bin/fftr2
-rwxr-xr-x root/root 10872 2011-10-14 17:38 usr/bin/msvq
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/gwave -> gwave.sh
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/us16 -> us16.sh
-rwxr-xr-x root/root 14082 2011-10-14 17:38 usr/bin/grlogsp.sh
-rwxr-xr-x root/root 19640 2011-10-14 17:38 usr/bin/gcep
-rwxr-xr-x root/root 12208 2011-10-14 17:38 usr/bin/dawrite
-rwxr-xr-x root/root 8008 2011-10-14 17:38 usr/bin/mc2b
-rwxr-xr-x root/root 19312 2011-10-14 17:38 usr/bin/fdrw
-rwxr-xr-x root/root 12584 2011-10-14 17:38 usr/bin/fft2
-rwxr-xr-x root/root 9872 2011-10-14 17:38 usr/bin/lpc
-rwxr-xr-x root/root 12240 2011-10-14 17:38 usr/bin/spec
-rwxr-xr-x root/root 19096 2011-10-14 17:38 usr/bin/mcep
-rwxr-xr-x root/root 8056 2011-10-14 17:38 usr/bin/zcross
-rwxr-xr-x root/root 10888 2011-10-14 17:38 usr/bin/merge
-rwxr-xr-x root/root 11008 2011-10-14 17:38 usr/bin/grpdelay
-rwxr-xr-x root/root 8760 2011-10-14 17:38 usr/bin/linear_intpl
-rwxr-xr-x root/root 13280 2011-10-14 17:38 usr/bin/amcep
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/uscd -> uscd.sh
-rwxr-xr-x root/root 9304 2011-10-14 17:38 usr/bin/vq
-rwxr-xr-x root/root 9400 2011-10-14 17:38 usr/bin/poledf
-rwxr-xr-x root/root 14992 2011-10-14 17:38 usr/bin/uels
-rwxr-xr-x root/root 12832 2011-10-14 17:38 usr/bin/dct
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/grlogsp -> grlogsp.sh
-rwxr-xr-x root/root 8104 2011-10-14 17:38 usr/bin/delay
-rwxr-xr-x root/root 9672 2011-10-14 17:38 usr/bin/zerodf
-rwxr-xr-x root/root 10904 2011-10-14 17:38 usr/bin/fft
-rwxr-xr-x root/root 8464 2011-10-14 17:38 usr/bin/rmse
-rwxr-xr-x root/root 9248 2011-10-14 17:38 usr/bin/pcas
-rwxr-xr-x root/root 9712 2011-10-14 17:38 usr/bin/df2
-rwxr-xr-x root/root 11984 2011-10-14 17:38 usr/bin/fd
-rwxr-xr-x root/root 7584 2011-10-14 17:38 usr/bin/step
-rwxr-xr-x root/root 11096 2011-10-14 17:38 usr/bin/lspcheck
-rwxr-xr-x root/root 11608 2011-10-14 17:38 usr/bin/gc2gc
-rwxr-xr-x root/root 21624 2011-10-14 17:38 usr/bin/psgr
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/bell -> bell.sh
-rwxr-xr-x root/root 9376 2011-10-14 17:38 usr/bin/c2ir
-rwxr-xr-x root/root 9464 2011-10-14 17:38 usr/bin/snr
-rwxr-xr-x root/root 13432 2011-10-14 17:38 usr/bin/mgc2mgc
-rwxr-xr-x root/root 12968 2011-10-14 17:38 usr/bin/pca
-rwxr-xr-x root/root 8296 2011-10-14 17:38 usr/bin/frame
-rwxr-xr-x root/root 7856 2011-10-14 17:38 usr/bin/decimate
lrwxrwxrwx root/root 0 2011-10-14 17:38 usr/bin/wav2raw -> wav2raw.sh
-rwxr-xr-x root/root 10872 2011-10-14 17:38 usr/bin/raw2wav.sh
-rwxr-xr-x root/root 9384 2011-10-14 17:38 usr/bin/freqt
-rwxr-xr-x root/root 9184 2011-10-14 17:38 usr/bin/levdur
-rwxr-xr-x root/root 11896 2011-10-14 17:38 usr/bin/lmadf
-rwxr-xr-x root/root 11584 2011-10-14 17:38 usr/bin/fftcep
-rwxr-xr-x root/root 8040 2011-10-14 17:38 usr/bin/reverse
-rwxr-xr-x root/root 11432 2011-10-14 17:38 usr/bin/lpc2lsp
-rw-r--r-- root/root 244488 2011-10-14 17:38 usr/lib/libSPTK.a
-rw-r--r-- root/root 14834 2011-10-14 17:38 usr/include/SPTK.h
drwxr-xr-x root/root 0 2011-10-14 17:38 usr/share/licenses/
drwxr-xr-x root/root 0 2011-10-14 17:38 usr/share/licenses/sptk/
-rw-r--r-- root/root 3096 2011-10-14 17:38 usr/share/licenses/sptk/COPYING
which means something from the build directory is moved into PKGDIR. Putting
rm -r ${pkgdir}/home
to the end of the package function solves this for me, but this only works if you build your stuff somewhere under /home.
Offline
OMG something is seriously wrong in the Makefile... bumblebee!!!
This silver ladybug at line 28...
Offline
Forgot to mention that this packages conflicts with boost, since both have a file /usr/bin/bcp.
Offline
OMG something is seriously wrong in the Makefile... bumblebee!!!
I agree!
Offline
@tomk:
Still there will be two variable with the nearly same content, one in upper, one in lower case.
Besides, Package Etiquette states, that unless the package cannot be built without doing so one should never use custom variables; and I want to stick as close as possible to the guidelines.
@Stefan Husmann:
I can confirm this and will look into it, thank you for that, I missed it.
Last edited by Calrama (2011-10-14 21:05:15)
Offline
Ok, so after I send the autobots out to scout the net for solutions and to inspect the Makefile(s), they came up with this:
Instead of trying to fix the DESTDIR problem the Makefile(s) seem(s) to have - I could not get it to install some files in the correct directory, would've had to write a sed oneliner to copy them - the easiest solution did come from BB, who found this (Example section at the bottom of the page).
I had never seen "make prefix=xxx install" before, but it works well. I could've used ./configure --prefix=$pkgdir/usr, but although the package will be made nicely that way, it will trigger a warning by makepkg concerning references to $pkgdir.
With make prefix=xxx install the files get installed in $pkgdir the way they should.
@Stefan: Could you please verify that it works for you as well?
Also, I added x68_64 to the arch array, since it seemed to build well for Stefan.
Last edited by Calrama (2011-10-14 21:06:27)
Offline
Hardcode the source tarball name without use of a variable
there will be two variable with the nearly same content, one in upper, one in lower case
???
Final clarification - my recommendation is this:
pkgname=sptk
pkgver=3.4.1
pkgrel=1
pkgdesc="A suite of speech signal processing tools."
arch=('i686' 'x68_64')
url="http://sourceforge.net/projects/sp-tk/files/"
license=('BSD')
depends=('libx11')
provides=('sptk')
conflicts=('boost')
source=(http://downloads.sourceforge.net/sp-tk/SPTK-$pkgver.tar.gz)
md5sums=('42615c62edcc0e1df5a83535d0b074f2')
build() {
cd "$srcdir/SPTK-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/SPTK-$pkgver"
make prefix="$pkgdir"/usr install
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
Offline
Isn't provides=('sptk') redundant?
Of course this packages provides itself. There is no package in the main repos this conflicts with (in terms of package name), so I don't see the purpose of this line.
Offline
Final clarification - my recommendation is this
Sorry, somehow my brain was not interpreting that when I was reading what you wrote. Anyway, thanks for the recommendation, I'll think about it before I post it to the AUR.
Isn't provides=('sptk') redundant?
Probably... I did not read the description about provide 'cause I thought it was obvious and just filled it out, thanks, read up on that option and will remove it before releasing.
Last edited by Calrama (2011-10-14 22:13:08)
Offline
Sorry for the late reply.
Having "make prefix=$pkgdir install" the build succeeds and the rubbish in $pkgdir/home is gone.
You are right, I build on x86_64. Forgot to mention that.
I also recommend to remove the provides line.
Happy contributing!
Offline
Too late, someone apparently contributed a PKGBUILD right after I made this thread... One that installs it the package to /opt no less, instead of simply stating that it conflicts with boost. Well, thanks for all your help anyway, too bad someone had strangely interesting timing >.>
Offline
Hi there,
I submitted the package, following the discussion there:
https://bbs.archlinux.org/viewtopic.php?id=128267
Is it possible to merge the two threads?
To summarize, here are some of the issues and the proposed solutions:
The package provides lots of binaries which are not necessarily used by everyone (these are just tools and not everybody needs all of them)
- libx11 dependency: it is only required to plot some graphics, so it is not really necessary, but it can be nice, should it be in optdepends ? (only built when libx11 is installed)
- tcsh dependency: some scripts are using #!/bin/csh, so should tcsh be in 'depends' or 'optdepends' (only built when tcsh is installed)
- boost conflict: this should not conflict because there is no reason to not be able to install both (see the other thread), solution proposed was to rename the binary or put it in /opt
Last edited by sebcactus (2011-10-17 09:27:02)
Offline
Pages: 1