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
|
#!/usr/bin/make -f
# Copyright (C) 2012-2015 Hunter Kaller
# Copyright (C) 2014-2016 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
# Fix hardening-no-bindnow and hardening-no-pie
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow,+pie
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_CXXFLAGS_MAINT_STRIP=-O2
export DEB_CFLAGS_MAINT_STRIP=-O2
ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq ($(ARCH), $(filter $(ARCH), amd64 i386))
CONFIG_EXTRA_FLAGS=--enable-sse
else ifeq ($(ARCH),armhf)
CONFIG_EXTRA_FLAGS=--disable-vg --disable-cg --enable-gles --enable-neon --enable-floathard
else ifeq ($(ARCH),arm64)
CONFIG_EXTRA_FLAGS=--disable-vg --disable-cg --enable-gles
endif
%:
dh $@ --parallel
override_dh_auto_configure:
sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
retroarch.cfg > debian/retroarch.cfg
sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
debian/retroarch.dirs.in > debian/retroarch.dirs
sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
debian/retroarch.install.in > debian/retroarch.install
# 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
./configure --prefix=/usr --disable-oss $(CONFIG_EXTRA_FLAGS)
override_dh_auto_build:
dh_auto_build
# SoftFilters
dh_auto_build -- -C gfx/video_filters/
# Audio DSP plugins
dh_auto_build -- -C audio/audio_filters/
override_dh_auto_install:
override_dh_auto_clean:
touch config.mk
dh_auto_clean
dh_auto_clean -- -C gfx/video_filters/ clean
dh_auto_clean -- -C audio/audio_filters/ clean
|