You are not logged in.

#1 2018-03-28 20:37:40

fettouhi
Member
Registered: 2007-05-07
Posts: 745

[SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

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

#2 2018-03-28 20:52:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

Please remove the redundant plea for help from your thread title: https://wiki.archlinux.org/index.php/Co … ow_to_post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-03-28 21:08:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

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

#4 2018-03-28 22:37:59

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

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

#5 2018-03-28 23:08:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

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

#6 2018-03-29 05:48:41

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

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

#7 2018-03-29 10:53:19

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

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

#8 2018-03-29 12:10:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

fettouhi wrote:

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

#9 2018-03-29 14:26:55

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

Lone_Wolf wrote:

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

#10 2018-03-29 14:36:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

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

#11 2018-03-29 17:34:29

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] Trying to build a moodbar package based on gst 1.0 plugins

Trilby wrote:

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

Board footer

Powered by FluxBB