#!/usr/bin/make -f # Copyright (C) 2010 Hunter Kaller # Copyright (C) 2014 Sergio Benjamim # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --parallel ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH) QUILT=QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null PATCH := $(QUILT) push -a || [ "$$($(QUILT) applied)" = "$$(grep -v '^\#' debian/patches/series)" ] UNPATCH := $(QUILT) pop -a || [ "$$($(QUILT) applied 2>&1)" = "No patches applied" ] patch: $(PATCH) unpatch: $(UNPATCH) override_dh_auto_configure: # See ./configure --help for valid flags # disable flags (i.e. --disable-ffmpeg for example) if there is no package relative to the feature in Build-Depends ifeq ($(ARCH), $(filter $(ARCH), amd64 i386)) ./configure --prefix=/usr --disable-ffmpeg --enable-sse else ifeq ($(ARCH),armhf) ./configure --prefix=/usr --disable-ffmpeg --disable-vg --disable-cg --enable-gles --enable-neon --enable-floathard endif override_dh_auto_build: $(MAKE) # SoftFilters $(MAKE) -C gfx/video_filters/ # Audio DSP plugins $(MAKE) -C audio/audio_filters/ override_dh_auto_install: # Add here commands to install the package into debian/retroarch. $(MAKE) DESTDIR=$(CURDIR)/debian/retroarch PREFIX=/usr install cp $(CURDIR)/AUTHORS $(CURDIR)/debian/retroarch/usr/share/doc/retroarch/ cp $(CURDIR)/debian/retroarch.desktop $(CURDIR)/debian/retroarch/usr/share/applications/ #cp $(CURDIR)/debian/retroarch.cfg $(CURDIR)/debian/retroarch/etc/ ifeq ($(ARCH),armhf) rm -f $(CURDIR)/debian/retroarch/usr/bin/retroarch-cg2glsl endif # SoftFilters cd $(CURDIR)/gfx/video_filters/ && \ cp *.so $(CURDIR)/debian/retroarch/usr/lib/retroarch/filters/video/ && \ cp *.filt $(CURDIR)/debian/retroarch/usr/lib/retroarch/filters/video/ # Audio DSP plugins cd $(CURDIR)/audio/audio_filters/ && \ cp *.so $(CURDIR)/debian/retroarch/usr/lib/retroarch/filters/audio/ && \ cp *.dsp $(CURDIR)/debian/retroarch/usr/lib/retroarch/filters/audio/ override_dh_auto_clean: touch config.mk $(MAKE) clean $(MAKE) -C gfx/video_filters/ clean $(MAKE) -C audio/audio_filters/ clean