You are not logged in.

#1 2012-09-08 08:22:54

mytbk
Member
Registered: 2012-05-27
Posts: 22

Is it possible to submit a multi-package PKGBUILD?

I've written a PKGBUILD which can build two(maybe more) packages, but it can't be posted to AUR. My PKGBUILD is as follows

# Maintainer: Iru Dog <mytbk920423@gmail.com>

# NOTE: This package relies on Mplayer's configure script to detect what is
# useful on your system. Build it on the machine you will use it on.
# If some features don't work, install the related optdepends *before*
# building.
# Before reporting any bug, please download a fresh copy of the package from
# the AUR and build the package using makepkg (not Yaourt).

pkgbase=mplayer-build
pkgname=("ffmpeg-lite" "mplayer-build")
arch=('i686' 'x86_64')
pkgver=1.1
pkgrel=5
depends=('libxv' 'libva' 'alsa-lib' 'libass' 'zlib' 'xvidcore' 'libogg' 'libvorbis' 'libtheora' 'flac' ) 
makedepends=('yasm')
source=()
md5sums=()

mplayer_tar='mplayer-export-snapshot.tar.bz2'
mplayer_source="http://www.mplayerhq.hu/MPlayer/releases/$mplayer_tar"

ffmpeg_tar='ffmpeg-snapshot.tar.bz2'
ffmpeg_source="http://ffmpeg.org/releases/$ffmpeg_tar"


build() {
	rm -rf $srcdir/*/
	wget -S -N $mplayer_source
	wget -S -N $ffmpeg_source

	tar xf mplayer-export-snapshot.tar.bz2 -C $srcdir
	cd $srcdir
	mv mplayer-*/ mplayer/
	tar xf ffmpeg-snapshot.tar.bz2 -C $srcdir/mplayer/

	unset CFLAGS LDFLAGS
	cd mplayer/ffmpeg
	./configure --prefix=/usr --enable-gpl --enable-version3 \
	--enable-shared --disable-ffserver \
	--disable-debug --disable-static \

	make
}

package_ffmpeg-lite() {
	pkgdesc='a complete, cross-platform solution to record, convert and stream audio and video'
	pkgver=0.11.1
	pkgrel=1
	url='http://ffmpeg.org/'
	license=('GPL')
	conflicts=('ffmpeg')
	provides=("ffmpeg=$pkgver")
	depends=('zlib' 'libva' 'alsa-lib')
	cd $srcdir/mplayer/ffmpeg/
	make DESTDIR=$pkgdir install
}

package_mplayer-build() {
	pkgdesc='Famous multimedia player,snapshot version, without GUI'
	url='http://www.mplayerhq.hu/'
	license=('GPL')
	conflicts=('mplayer')
	provides=("mplayer")
	backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
	cd $srcdir/mplayer/

	./configure --prefix=/usr --confdir=/etc/mplayer --enable-menu \
	--disable-mencoder --disable-mpg123 --disable-x264 \
	--disable-aa --disable-caca --disable-md5sum \
	--disable-ossaudio --disable-arts --disable-cddb --disable-libdv \
	--disable-lirc --disable-lircc --disable-liblzo --disable-libcdio \
	--disable-libgsm --disable-librtmp --disable-libdca --disable-speex \
	--disable-pulse --disable-jack --disable-xss \
	--disable-libschroedinger-lavc --disable-faad \
	--disable-faac --disable-vdpau 

	make
	make DESTDIR=$pkgdir install
}

I do think there is some way to solve this problem, which may improve AUR to some extent.

Offline

#2 2012-09-08 08:32:16

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: Is it possible to submit a multi-package PKGBUILD?

There shouldn't be any PKGBUILDs for multiple packages, only split-packages (one source to compile and split into multiple packages, e.g. headers and binaries) This looks like it should be separated into two files with the correct dependencies.

Offline

#3 2012-09-08 12:05:00

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

Re: Is it possible to submit a multi-package PKGBUILD?

+1 for split packages only.  You would simply your 2nd package as a dep of the first.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#4 2012-09-08 13:26:34

mytbk
Member
Registered: 2012-05-27
Posts: 22

Re: Is it possible to submit a multi-package PKGBUILD?

Well, can somebody please give me an example of split packages in AUR?

Offline

#5 2012-09-08 14:23:22

Awebb
Member
Registered: 2010-05-06
Posts: 4,426

Re: Is it possible to submit a multi-package PKGBUILD?

Offline

#6 2012-09-08 15:10:23

mytbk
Member
Registered: 2012-05-27
Posts: 22

Re: Is it possible to submit a multi-package PKGBUILD?

OK, it's disappointing AUR doesn't support split(and of course multi) packages, but thanks anyway.

Offline

#7 2012-09-08 15:32:58

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,595
Website

Re: Is it possible to submit a multi-package PKGBUILD?

But it does... with a minor hack.  See the linux-ck package in the AUR for the code.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#8 2012-09-08 15:34:33

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: Is it possible to submit a multi-package PKGBUILD?

mytbk wrote:

OK, it's disappointing AUR doesn't support split(and of course multi) packages, but thanks anyway.

Split packages can be hidden from AUR and uploaded and displayed like normal packages. Here is an example.
But your use of the split-package functionality to create a multipackage PKGBUILD is plain wrong. One PKGBUILD is meant to build exactly one library or application. Never build two different things with one file.

Offline

#9 2012-09-08 15:56:41

mytbk
Member
Registered: 2012-05-27
Posts: 22

Re: Is it possible to submit a multi-package PKGBUILD?

Thanks. I'm not so familiar with the programming of the shell, so I think this is a marvelous hack.
I write this mplayer PKGBUILD to make use of the ffmpeg source code to build a ffmpeg package, but for most of the users, maybe it is not a good idea.
By the way, I've just used yaourt to install the splittest, and it installs all the packages. Maybe it is the reason why AUR doesn't support split packages. If I can choose which of the split packages to install in yaourt, it'll be great.

Offline

Board footer

Powered by FluxBB