aboutsummaryrefslogtreecommitdiffstats
path: root/main/vlc/APKBUILD
blob: 291076bf881c88a8e7729927eb0085a5095ac3da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# Contributor: Leonardo Arena <rnalrd@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vlc
pkgver=1.1.12
pkgrel=0
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
pkgusers="vlc"
pkggroups="vlc"
url="http://www.videolan.org/vlc/"
arch="all"
license="GPL-2"
triggers="$pkgname.trigger=/usr/lib/vlc/plugins"
subpackages="$pkgname-dev $pkgname-doc $pkgname-xorg $pkgname-daemon"
#depends="libnotify a52dec fluidsynth zvbi libdvbpsi lirc-utils libdca hal 
#	libproxy sdl_image libdvdnav>=4.1.3 lua libxv libv4l libcddb smbclient
#	libmatroska taglib sysfsutils libmpcdec ffmpeg>=0.5 libshout libmad
#	qt fribidi libmpeg2 libmodplug avahi ttf-dejavu"
depends="ttf-dejavu"
makedepends="
	a52dec-dev
	alsa-lib-dev
	automake
	autoconf
	libtool
	dbus-dev
	faad2-dev
	ffmpeg-dev
	flac-dev
	fribidi-dev
	gtk+-dev
	libdc1394-dev
	libdvbpsi-dev
	libgcrypt-dev
	libice-dev
	libiconv-dev
	libmad-dev
	libmpeg2-dev
	libnotify-dev
	libogg-dev
	libraw1394-dev
	libshout-dev
	libsm-dev
	libtheora-dev
	libvorbis-dev
	libx11-dev
	libxext-dev
	libxv-dev
	live-media-dev
	lua-dev
	ncurses-dev
	mesa-dev
	pkgconfig
	sdl-dev
	speex-dev
	sysfsutils-dev
	taglib-dev
	v4l-utils-dev
	x264-dev
	xcb-util-renderutil-dev
	xcb-util-keysyms-dev
	"
source="http://download.videolan.org/pub/videolan/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2
	uclibc3.patch
	uclibc-libcompat.patch
	uclibc-inhibit-spawn.patch
	vlc.trigger
	vlc-1.1.7-disable-cache-gen.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac;
	done
	sed -i -e "/^SOURCES_xscreensaver/s/^/#/" modules/misc/Modules.am
	./bootstrap
}

build ()
{
	cd "$_builddir"
	sed -i -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf:' modules/misc/freetype.c

	export CFLAGS="$CFLAGS -D_GNU_SOURCE"

	./configure --prefix=/usr \
		--disable-mmx \
		--disable-nls \
		--disable-optimizations \
		--disable-qt4 --disable-skins2 \
		--disable-rpath \
		--enable-a52 \
		--enable-avcodec \
		--enable-avformat \
		--enable-dbus \
		--enable-dbus-control \
		--enable-dc1394 \
		--enable-dvbpsi \
		--enable-faad \
		--enable-flac \
		--enable-httpd \
		--enable-live555 \
		--enable-merge-ffmpeg \
		--enable-ncurses \
		--enable-realrtsp \
		--enable-sdl \
		--enable-shout \
		--enable-speex \
		--enable-sout \
		--enable-taglib \
		--enable-theora \
		--enable-v4l \
		--enable-v4l2 \
		--enable-vlm \
		--enable-vorbis \
		--enable-wma-fixed \
		--enable-xvideo \
		|| return 1

#		--enable-dvdread \
#		--enable-dvdnav \
#		--enable-qt4 \
#		--enable-skins2 \
#		--enable-dvb \
#		--enable-snapshot \
#		--enable-hal \
#		--enable-lirc \
#		--enable-pvr \

	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
#	for res in 16 32 48 128; do
#		install -D -m644 share/vlc${res}x${res}.png \
#			"$pkgdir"/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png || return 1
#	done
	rm -rf "$pkgdir"/usr/lib/mozilla
	find "$pkgdir" -name '*.la' -delete
}

_mv() {
	local dir=${1%/*}
	mkdir -p "$subpkgdir"/$dir
	mv "$1" "$subpkgdir"/$dir/
}

xorg() {
	pkgdesc="Video LAN X.org support"
	# scan for elf files that directly or indirectly depends on
	# libX* libraries
	cd "$pkgdir"
	for i in $(find -type f ); do
		if ldd $i 2>/dev/null | grep -q libX; then
			echo $i | grep libavcodec_plugin.so || _mv "$i" || return 1
		fi
	done

	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/applications \
		"$pkgdir"/usr/share/icons \
		"$subpkgdir"/usr/share/
}

daemon() {
	pkgdesc="Support for running VLC as a daemon"
	install="vlc-daemon.pre-install"
	arch="noarch"
	depends="vlc"

	mkdir -p "$subpkgdir"
	cd "$pkgdir"
	install -D -m755 ../../vlc.initd $subpkgdir/etc/init.d/vlc
	install -D -m664 ../../vlc.confd $subpkgdir/etc/conf.d/vlc
	install -d -o vlc -g vlc "$subpkgdir"/var/log/vlc
}

md5sums="91de1ad308c947e35380f9d747ff5713  vlc-1.1.12.tar.bz2
ba24152286d98f8a367c7fd0cb8949f4  uclibc3.patch
402d28075ff672d4f273cf8b9b1b3137  uclibc-libcompat.patch
c40a7df07af3b68a109b4d6bf04155d2  uclibc-inhibit-spawn.patch
ddbd40bd72fedc1449be45588aea5d66  vlc.trigger
e1ef2dec8e25f7ea6ba40e646c63e061  vlc-1.1.7-disable-cache-gen.patch"