# # Makefile for MPlayer Slackware package # Copyright (c) 2004 by Robert Stan # PROGNAME = MPlayer VERSION = 1.0pre5 ARCH = i686 BUILD = 1rob SOURCE = http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-$(VERSION).tar.bz2 DOCS = AUTHORS ChangeLog LICENSE README CUSTNAME = mplayer PKGNAME = $(CUSTNAME)-$(VERSION)-$(ARCH)-$(BUILD) MAINTAINER = Robert Stan CFLAGS = "-O3 -pipe -march=$(ARCH) -mcpu=i686 -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions" CXXFLAGS = $(CFLAGS) STRIPLIB = y STRIPBIN = y TMP = /var/tmp PKG = $(TMP)/package-$(PROGNAME)-$(VERSION) conf: prep ln -s mplayer-$(VERSION) $(PROGNAME)-$(VERSION); \ cd $(PROGNAME)-$(VERSION); \ chown -R root.root .; \ find . -perm 600 -exec chmod 644 {} \;; \ find . -perm 700 -exec chmod 755 {} \;; \ for patchfile in ../patches/*; do patch -p1 < $$patchfile; done; \ CFLAGS=$(CFLAGS) CXXFLAGS=$(CXXFLAGS) \ ./configure --prefix=/usr \ --confdir=/etc/mplayer \ --target=$(ARCH) \ --enable-largefiles \ --enable-gui \ --enable-runtime-cpudetection \ --enable-xvid \ --disable-smb \ --disable-aa \ --disable-svga \ --with-codecsdir=/usr/lib/codecs \ --with-reallibdir=/usr/lib/codecs \ --with-win32libdir=/usr/lib/codecs \ --enable-freetype build: conf make -j4 -C $(PROGNAME)-$(VERSION) package: build mkdir -p $(PKG)/usr/share/{applications,application-registry,mime-info,mplayer,pixmaps} mkdir -p $(PKG)/usr/doc/$(PROGNAME)-$(VERSION) cd $(PROGNAME)-$(VERSION); \ cp -a $(DOCS) $(PKG)/usr/doc/$(PROGNAME)-$(VERSION); \ cd DOCS; cp -a * $(PKG)/usr/doc/$(PROGNAME)-$(VERSION); cd ..; \ cp Gui/mplayer/pixmaps/MPlayer_mini.xpm $(PKG)/usr/share/pixmaps; \ make install DESTDIR=$(PKG) mkdir -p $(PKG)/usr/share/mplayer/Skin cwd=`pwd`; cd $(PKG)/usr/share/mplayer/Skin; \ for skin in $$cwd/skins/*.tar.bz2 ; do tar xvjf $$skin ; done; \ chown -R root.root .; \ find . -type d -exec chmod 755 {} \;; \ find . -type f -exec chmod 644 {} \; cwd=`pwd`; cd $(PKG)/usr/share/mplayer; tar xvjf $$cwd/font.tar.bz2 cp -a $(PKG)/usr/share/mplayer/Skin/Blue/icons/icon48x48.png $(PKG)/usr/share/pixmaps/mplayer-Blue.png cp -a gmplayer.desktop $(PKG)/usr/share/applications cp -a gmplayer.applications $(PKG)/usr/share/application-registry cp -a gmplayer.keys $(PKG)/usr/share/mime-info cp -a $(PROGNAME)-$(VERSION)/etc/codecs.conf $(PKG)/etc/mplayer/codecs.conf-example cp -a $(PROGNAME)-$(VERSION)/etc/example.conf $(PKG)/etc/mplayer/mplayer.conf-example cp -a $(PROGNAME)-$(VERSION)/etc/input.conf $(PKG)/etc/mplayer/input.conf-example cp -a $(PROGNAME)-$(VERSION)/etc/menu.conf $(PKG)/etc/mplayer/menu.conf-example cat slack-desc > ../$(PKGNAME).txt cat slack-desc > $(PKG)/install/slack-desc cat doinst.sh >> $(PKG)/install/doinst.sh cat slack-required > $(PKG)/install/slack-required STRIPLIB=$(STRIPLIB) STRIPBIN=$(STRIPBIN) ../../preparepkg $(PKG) cd $(PKG) ; makepkg -l y -c n $(PKGNAME).tgz mv $(PKG)/$(PKGNAME).tgz .. include ../../Makefile.global