Source

VPlayer / Makefile

Full commit

VERSION=0.8.2

RESOURCES = translations_rc.py resources_rc.py
UIS = guicomponents/fillplaylist_qt.py \
	mainwindow_qt.py \
	minigui_qt.py \
	options_qt.py \
	guicomponents/playlists_qt.py \
	guicomponents/searchwidget_qt.py \
	guicomponents/playlistwidget_qt.py \
	guicomponents/controlwidget_qt.py \
	guicomponents/collectionwidget_qt.py \
	guicomponents/trackinfowidget_qt.py \
	guicomponents/fileswidget_qt.py \
	guicomponents/albumsearchwidget_qt.py \
	guicomponents/ipodwidget_qt.py \
	about_qt.py

TRANSLATIONS = vplayer_ru.qm vplayer_uk.qm

all: Makefile uis translations resources
	python setup.py bdist

%_rc.py: %.qrc $(RESORCES)
	pyrcc4 -o $@ $<

%_qt.py: %_qt.ui
	pyuic4 $< | sed s/'import resources_rc'/'import vplayer.resources_rc'/ > $@

%.qm: %.ts
	lrelease $< -qm $@

uis: $(UIS)

resources: $(RESOURCES)

translations: $(TRANSLATIONS)

install: all
	python setup.py install
	install -Dm755 vplayer /usr/bin/vplayer
	install -Dm644 vplayer.desktop /usr/share/applications/vplayer.desktop
	install -Dm644 icon.svg /usr/share/pixmaps/vplayer.svg
	install -Dm644 icon.xpm /usr/share/pixmaps/vplayer.xpm
	install -Dm644 icon.png /usr/share/pixmaps/vplayer.png

clean:
	rm *_qt.py
	rm *_rc.py
	rm *.qm
	rm guicomponents/*_qt.py
	rm *.pyc
	rm guicomponents/*.pyc
	rm -rf build
	rm -rf dist

deb: translations resources uis
	python setup.py bdist
	mkdir -p deb
	tar xv -C deb -f dist/vplayer-$(VERSION).linux-i686.tar.gz
	mkdir -p deb/usr/bin
	mkdir -p deb/usr/share/pixmaps
	mkdir -p deb/usr/share/applications
	cp vplayer deb/usr/bin/vplayer
	cp icon.svg icon.xpm icon.png deb/usr/share/pixmaps/
	cp vplayer.desktop deb/usr/share/applications/
	chmod 755 deb/usr/bin/vplayer
	chmod 644 deb/usr/share/pixmaps/* deb/usr/share/applications/*
	mkdir -p deb/DEBIAN
	cp control deb/DEBIAN/
	dpkg -b deb vplayer-$(VERSION).deb