You are not logged in.
I am trying to build a new moodbar package for AUR based on the 1.0 gst plugins. I came across a new upstream on package of it on github
https://github.com/exaile/moodbar
I am having a bit of trouble setting necessary flags for building the package. This is my PKGBUILD so far
# Contributor: fettouhi <A.Fettouhi@gmail.com>
pkgname=moodbar
pkgver=1.0
pkgrel=1
pkgdesc="moodbar binaries and script for Amarok"
arch=(i686 x86_64)
url="https://github.com/exaile/moodbar/releases/download/v1.0/"
license=('GPL')
depends=('fftw' 'gst-plugins-base' 'gst-plugins-base-libs' 'gst-plugins-bad' 'gst-plugins-good' 'gst-plugins-ugly')
makedepends=('pkgconfig' 'make' 'meson' 'ninja')
source=("https://github.com/exaile/moodbar/releases/download/v1.0/${pkgname}-${pkgver}.tar.xz")
sha256sums=('17585aa621c2b34ac6f93d2b749f561138411d0c27a7719012f37adcaaffda95')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
env CXXFLAGS=... LDFLAGS=... meson --buildtype=plain --prefix=... builddir
ninja -C builddir
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
env DESTDIR="$pkgdir" ninja -C builddir install
}
the PKGBUILD is based on the original PKGBUILD of the 0.1.2 version of moodbar that is currently on AUR. Any help would be much appreciated.
Last edited by fettouhi (2018-03-29 17:34:49)
Offline
Please remove the redundant plea for help from your thread title: https://wiki.archlinux.org/index.php/Co … ow_to_post
Offline
You should not set CXXFLAGS or LDFLAGS, they are set in makepkg.conf. If any additions are needed they will be added by moodbar's build system (they may only be added with `--buildtype=release` which you should probably use here). The prefix should be /usr as in any other PKGBUILD.
You may also consider making this a -git package so the PKGBUILD doesn't need to be updated every time there's a new version upstream. Alternatively, if you want to follow tagged releases, you'd be better off replacing the v1.0 in the url with v${pkgver}.
Last edited by Trilby (2018-03-28 21:11:51)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Trilby, --buildtype=plain tells meson to *just* use the environment CXXFLAGS rather than trying to take over and provide its own extras for debugging or release optimization. Build systems which trample all over the CXXFLAGS by reimplementing everything suck, it would be more honest for them to simply ignore CXXFLAGS altogether.
That being said, yes, meson should and does detect this in the environment from makepkg.conf -- why use env here? env is meant for black magic manipulation of the environment, using it just to add new environment variables is completely overkill when you could just use
CXXFLAGS=... LDFLAGS=... meson --buildtype=plain --prefix=... builddir
Which is as Trilby said wrong to override makepkg.conf like that.
...
The url should not link to the releases tab, since that is not the homepage... but you're not even using the releases tab and instead are using a 404 error page...
srcdir is unquoted.
makedepends should *not* include base-devel packages like 'pkgconfig' and 'make'. meson already depends on ninja (that's sort of the point).
> I am having a bit of trouble setting necessary flags for building the package.
What makes you think you need to? What issues are you having? So far you've literally said nothing to explain what your issue might be.
Last edited by eschwartz (2018-03-28 22:39:18)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I think the issue might just be trying to be to literal in following silly upstream instructions.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Would this then be more correct?
# Contributor: fettouhi <A.Fettouhi@gmail.com>
pkgname=moodbar
pkgver=1.0
pkgrel=1
pkgdesc="moodbar binaries and script for Amarok"
arch=(i686 x86_64)
url="https://github.com/exaile/moodbar/releases"
license=('GPL')
depends=('fftw' 'gst-plugins-base' 'gst-plugins-base-libs' 'gst-plugins-bad' 'gst-plugins-good' 'gst-plugins-ugly')
makedepends=('meson')
source=("https://github.com/exaile/moodbar/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('17585aa621c2b34ac6f93d2b749f561138411d0c27a7719012f37adcaaffda95')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
meson --buildtype=plain builddir
ninja -C builddir
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
ninja -C builddir install
}
How do I set the builddir?
Last edited by fettouhi (2018-03-29 05:49:04)
Offline
builddir is not a variable for meson, but the actual name of the directory where build is taking place.
I found using builddir as directyory name confusing, and decided on _build instead.
libdrm-git in AUR shows how I deal with meson.
(setup is the default command meson executes when no command is specified, so i could have omitted it.
But I'm a bit of a control freak)
Last edited by Lone_Wolf (2018-03-29 10:54:03)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Would this then be more correct?
Does it work? Does it make a package? Does namcap complain about the package?
Have you even tried running makepkg on it yet?
We can help with anything you're confused on, but we expect that you put in some of the effort here.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
builddir is not a variable for meson, but the actual name of the directory where build is taking place.
I found using builddir as directyory name confusing, and decided on _build instead.libdrm-git in AUR shows how I deal with meson.
(setup is the default command meson executes when no command is specified, so i could have omitted it.
But I'm a bit of a control freak)
I looked at your PKGBUILD and that helped a lot. The package now builds and it works as well with Clementine. This is my current version of the PKGBUILD
# Maintainer: fettouhi <A.Fettouhi@gmail.com>
# Contributor: Neverth <t-r-a-y@mbnet.fi>
# Contributor: Marvn
pkgname=moodbar
pkgver=1.0
pkgrel=1
pkgdesc="moodbar binaries and script for Amarok"
arch=(i686 x86_64)
url="https://github.com/exaile/moodbar/releases"
license=('GPL')
depends=('fftw' 'gst-plugins-base' 'gst-plugins-base-libs' 'gst-plugins-bad' 'gst-plugins-good' 'gst-plugins-ugly')
makedepends=('meson')
source=("https://github.com/exaile/moodbar/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('17585aa621c2b34ac6f93d2b749f561138411d0c27a7719012f37adcaaffda95')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
meson --prefix /usr \
--buildtype plain _build
ninja -C _build
}
check() {
cd ${srcdir}/${pkgname}-${pkgver}
meson test -C _build
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
DESTDIR="$pkgdir" ninja -C _build install
mkdir -p "${pkgdir}/usr/share/licenses/$pkgname"
install -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname"
}
One small issue I have with this still the check() section I added doesn't seem to do anything. During build it writes
ninja: Entering directory `/home/af/Hentninger/moodbar/src/moodbar-1.0/_build'
ninja: no work to do.
No tests defined.
am I utilising this wrong in my case. The reason I put it in it is because it mentioned here as an option
https://github.com/exaile/moodbar#testing
Last edited by fettouhi (2018-03-29 14:31:20)
Offline
Great, now you could check the build package with namcap. On the PKGBUILD itself I see a few style points to consider: first, I'd definitely get rid of all the excess whitespace at the start of the lines. Indenting within blocks (e.g. functions) is useful, but otherwise get rid of it.
Also, there is no reason to break the first meson command onto two lines - especially given that you have an even longer line later in the PKGBUILD, and niether of them are particularly long. But if you do break a command onto multiple lines, its best to then add an additional indentation to any continuation lines (so they stand out as being 'subordinate' rather than looking like their own command).
As for the check/tests, if upstream doesn't define any tests, then it serves no purpose: get rid of the check function.
Last edited by Trilby (2018-03-29 14:36:57)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Great, now you could check the build package with namcap. On the PKGBUILD itself I see a few style points to consider: first, I'd definitely get rid of all the excess whitespace at the start of the lines. Indenting within blocks (e.g. functions) is useful, but otherwise get rid of it.
Also, there is no reason to break the first meson command onto two lines - especially given that you have an even longer line later in the PKGBUILD, and niether of them are particularly long. But if you do break a command onto multiple lines, its best to then add an additional indentation to any continuation lines (so they stand out as being 'subordinate' rather than looking like their own command).
As for the check/tests, if upstream doesn't define any tests, then it serves no purpose: get rid of the check function.
Thanks for the suggestions and criticisms. I removed the ceheck function and cleaned the PKGBUILD up. Just uploaded it to the AUR. Many thanks for everybodys help.
Offline