1
0
mckaygerhard b420f18423 reorganize distro files for packaging: deb/rpm/apk
* move debian directory to misc/debian
* move rmp shit distro directory the spec file and changelog
* move the alpine directory in misc with a minimal started files
* still there's an error on spec file for name of the tarball
* all of those files it depends of the previous commit that gives init/shistemd
2022-12-30 12:19:48 -04:00

83 lines
2.6 KiB
Makefile
Executable File

#!/usr/bin/make -f
export DH_VERBOSE = 1
DH_VERBOSE = 1
export VERBOSE = 1
VERBOSE = 1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CUFLAGS = -O0
else
CUFLAGS = -O2 -fomit-frame-pointer -fexpensive-optimizations -fpermissive -Wall
ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
CUFLAGS = -m32 -O3 -fomit-frame-pointer -fexpensive-optimizations -march=pentium3 -mtune=nocona -mmmx -msse -mno-sse2 -mno-sse3 -fpermissive -mfpmath=sse -Wall
endif
ifneq (,$(findstring i486,$(DEB_BUILD_ARCH)))
CUFLAGS = -m32 -O3 -fomit-frame-pointer -fexpensive-optimizations -march=pentium3 -mtune=nocona -mmmx -msse -mno-sse2 -mno-sse3 -fpermissive -mfpmath=sse -Wall
endif
ifneq (,$(findstring amd64,$(DEB_BUILD_ARCH)))
CUFLAGS = -O3 -fomit-frame-pointer -fexpensive-optimizations -mtune=nocona -mmmx -msse -msse2 -fpermissive -mfpmath=sse -Wall
endif
endif
export CFLAGS=$(CUFLAGS)
export CXXFLAGS=$(CUFLAGS)
export DEB_CFLAGS_MAINT_APPEND = $(CUFLAGS)
export DEB_CXXFLAGS_MAINT_APPEND = $(CUFLAGS)
export DEB_BUILD_MAINT_OPTIONS = hardening=+fortify,+stackprotector,+relro,+bindnow,-pie
# older bz comprension
export DEB_DH_BUILDDEB_ARGS = -- -Zbzip2
# avoid useless dependencies
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
override_dh_auto_configure:
dh_auto_configure -- \
-DCUSTOM_DOCDIR=/usr/share/doc/multicraft-data \
-DCUSTOM_LOCALEDIR=/usr/share/locale \
-DCUSTOM_SHAREDIR=/usr/share/games/multicraft \
-DBUILD_SERVER=ON \
-DBUILD_CLIENT=ON \
-DRUN_IN_PLACE=OFF \
-DENABLE_CURL=ON \
-DENABLE_SOUND=ON \
-DENABLE_LUAJIT=ON \
-DENABLE_GETTEXT=ON \
-DENABLE_FREETYPE=ON \
-DENABLE_SYSTEM_GMP=ON \
-DENABLE_SYSTEM_JSONCPP=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_SPATIAL=ON \
-DENABLE_LEVELDB=ON \
-DENABLE_REDIS=ON \
-DENABLE_POSTGRESQL=ON \
-DJSON_INCLUDE_DIR=/usr/include/jsoncpp \
-DFREETYPE_INCLUDE_DIR_freetype2=/usr/include/freetype2 \
-DFREETYPE_INCLUDE_DIR_ft2build=/usr/include \
-DLEVELDB_INCLUDE_DIR=/usr/include/leveldb \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
# -DPNG_PNG_INCLUDE_DIR=$(pkg-config libpng --variable=includedir) \
override_dh_installchangelogs:
# dh_installchangelogs debian/changelog.upstream
override_dh_install:
find . -iname "license.txt" -delete
dh_install --list-missing
override_dh_clean:
dh_clean
$(RM) -r bin
$(RM) -r lib/jsoncpp lib/gmp
override_dh_builddeb:
dh_builddeb -- -Zgzip
%:
dh ${@}