Package-Name: libtheora
Gentoo-Package: media-libs/libtheora
Requires: libogg
Rebuild-For: libvorbis SDL
Homepage: http://www.xiph.org/
Source: http://downloads.xiph.org/releases/theora//(libtheora-(\d+(\.\d+)+(alpha\d+)?)\.tar\.gz)/[\0-\377]*?libtheora-(\d+(.\d+)+(alpha\d+)?).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
Compile:
	cp -pf COPYING README "$(PREFIX)/"
	$(MAKE) -f ../Makefile configure
	$(MAKE)
	$(MAKE) install
	rm -rf "$(PREFIX)"/doc.new
	mv "$(PREFIX)"/share/doc/libtheora-"$(VERSION)" "$(PREFIX)"/doc.new
	rm -rf "$(PREFIX)"/doc
	mv "$(PREFIX)"/doc.new "$(PREFIX)"/doc
	rmdir "$(PREFIX)"/share/doc
	-rmdir "$(PREFIX)"/share
Install:
	$(MAKE) instinc INC=theora
	$(MAKE) instlib LIB=theora
	$(MAKE) addldso
	$(MAKE) instpc PC=theora
Clean:
	@set -e ; cd "$(PREFIX)"/lib ; \
	for lib in *.so.[0-9] ; do \
		reallib=`/bin/ls -l "$$lib" | sed 's/.* -> //'` ; \
		for file in $$lib.[0-9]*.[0-9]* ; do \
			if test "$$file" != "$$reallib" ; then \
				rm -fv "$$file" ; \
			fi ; \
		done ; \
	done

/pkg/libtheora/
/usr/include/theora
/usr/lib/libtheora.*
/usr/lib/pkgconfig/theora.pc
