You are not logged in.

#1 2017-05-24 17:57:57

TyranT
Banned
Registered: 2017-03-01
Posts: 88

[PKGBUILD Review] lib32-libxmp-git

This is mostly for Unreal (www.oldunreal.com). It requires a 32bit build.

# Maintainer: Vincent Grande <shoober420>
# Contributor: Chromaryu <knight.ryu12@gmail.com>
pkgname=lib32-libxmp-git
pkgver=libxmp.4.4.1.r113.g19ad5b32
pkgrel=1
pkgdesc="Library that supports over 90 module formats (Amiga, Atari, ..)"
arch=('i686' 'x86_64')
url="http://xmp.sourceforge.net/"
license=('GPL')
depends=('glibc')
optdepends=('pulseaudio')
makedepends=('git')
conflicts=('lib32-libxmp')
provides=('lib32-libxmp')
source=("$pkgname"::"git+https://github.com/cmatsuoka/libxmp.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

        cd "$srcdir/$pkgname"
        autoconf
        ./configure --prefix=/usr --libdir=/usr/lib32
        make
}

package() {
        cd "$srcdir/$pkgname"
        make DESTDIR="$pkgdir" install

        rm -rf "${pkgdir}"/usr/{include,share,bin}
}

Offline

#2 2017-05-28 14:52:21

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

Re: [PKGBUILD Review] lib32-libxmp-git

rm -rf "${pkgdir}"/usr/{include,share,bin}

Why are you removing all those files ?

If they are provided by some other package,that other package should be listed as a dependency.


arch=('i686' 'x86_64')

This is  a multilib package aka a 32-bit build compiled to run in a x86_64 environment .
It makes no sense to build this on i686 architecture.


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

#3 2017-05-28 18:43:54

TyranT
Banned
Registered: 2017-03-01
Posts: 88

Re: [PKGBUILD Review] lib32-libxmp-git

Lone_Wolf wrote:

Why are you removing all those files ?

If they are provided by some other package,that other package should be listed as a dependency.

I thought the $pkgdir command just removed old files from the previous install. I've noticed that with most 32bit packages, there are conflicting files when trying to install. I'm assuming they are from the 64bit build. I figured it was just removing the files, and then putting them back on after you install the package.

Lone_Wolf wrote:

This is  a multilib package aka a 32-bit build compiled to run in a x86_64 environment .
It makes no sense to build this on i686 architecture.

My bad, I'll remove i686 from all my packages if present, thank you.

Offline

#4 2017-05-29 09:32:54

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

Re: [PKGBUILD Review] lib32-libxmp-git

I thought the $pkgdir command just removed old files from the previous install. I've noticed that with most 32bit packages, there are conflicting files when trying to install. I'm assuming they are from the 64bit build. I figured it was just removing the files, and then putting them back on after you install the package.

That indicates a rather severe misunderstanding of how makepkg /pacman works.

run makepkg on the lib32-libxmp-git PKGBUILD and try to understand what makepkg is doing .

What folders on your filesystem correspond to $srcdir and $pkgdir ?
What is the relation between $pkgdir and the *.pkg.tar.xz file ?

If you build without the rm-line , what changes in $pkgdir and the *.pkg.tar.xz ?


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

Board footer

Powered by FluxBB