2024-08-09 21:03:03 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2024-08-09 23:52:51 +02:00
|
|
|
export DEB_CFLAGS_MAINT_STRIP = -fstack-protector-strong -fcf-protection=full -Wincompatible-pointer-types
|
|
|
|
export DEB_BUILD_MAINT_OPTIONS = optimize=-lto -Wno-incompatible-pointer-types -Wno-error
|
2024-08-09 21:03:03 +02:00
|
|
|
|
|
|
|
# Prefer gcc-4.5, then 4.7, then 4.9 - otherwise fallback to gcc.
|
|
|
|
export CC = $(shell for _cc in gcc-4.5 gcc-4.7 gcc-4.9 gcc false; do \
|
|
|
|
if which "$$_cc" >/dev/null 2>&1; then echo "$$_cc"; break; fi; done)
|
|
|
|
|
|
|
|
|
2024-08-09 20:59:19 +02:00
|
|
|
%:
|
2024-08-09 21:03:03 +02:00
|
|
|
dh $@ --parallel
|
|
|
|
# dh $@ --max-parallel=1
|
|
|
|
|
|
|
|
|
|
|
|
override_dh_auto_configure:
|
|
|
|
# Run configure
|
|
|
|
ifeq ($(DEB_BUILD_ARCH), amd64)
|
|
|
|
./configure --prefix=/opt/wine-staging \
|
|
|
|
--libdir=\$${prefix}/lib64 \
|
|
|
|
--mandir=\$${prefix}/share/man \
|
|
|
|
--infodir=\$${prefix}/share/info \
|
|
|
|
--enable-win64 \
|
|
|
|
--disable-tests \
|
|
|
|
--with-gstreamer \
|
|
|
|
--with-xattr \
|
|
|
|
|
|
|
|
$(CONFFLAGS)
|
|
|
|
else
|
|
|
|
./configure --prefix=/opt/wine-staging \
|
|
|
|
--libdir=\$${prefix}/lib \
|
|
|
|
--mandir=\$${prefix}/share/man \
|
|
|
|
--infodir=\$${prefix}/share/info \
|
|
|
|
--disable-tests \
|
|
|
|
--with-gstreamer \
|
|
|
|
--with-xattr \
|
|
|
|
|
|
|
|
$(CONFFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
override_dh_auto_test:
|
|
|
|
# Wine's test suite does not pass on build daemons, skip it for now
|
|
|
|
|
|
|
|
|
|
|
|
override_dh_installdocs:
|
|
|
|
dh_installdocs --link-doc=wine-staging
|
|
|
|
|
|
|
|
|
|
|
|
override_dh_install:
|
|
|
|
dh_install --fail-missing
|
|
|
|
|
|
|
|
# These files will end up in multiple packages otherwise
|
|
|
|
rm -f debian/wine-staging/opt/wine-staging/bin/wine
|
|
|
|
rm -f debian/wine-staging/opt/wine-staging/bin/wine-preloader
|
|
|
|
rm -f debian/wine-staging/opt/wine-staging/bin/wine64
|
|
|
|
rm -f debian/wine-staging/opt/wine-staging/bin/wine64-preloader
|
|
|
|
|
|
|
|
# Compat symlinks for bindir
|
|
|
|
mkdir -p debian/winehq-staging/usr/bin
|
|
|
|
for _file in $$(ls "debian/wine-staging/opt/wine-staging/bin"); do \
|
|
|
|
ln -s "/opt/wine-staging/bin/$$_file" "debian/winehq-staging/usr/bin/$$_file"; \
|
|
|
|
done
|
|
|
|
for _file in wine wine-preloader; do \
|
|
|
|
ln -s "/opt/wine-staging/bin/$$_file" "debian/winehq-staging/usr/bin/$$_file"; \
|
|
|
|
done
|
|
|
|
ifeq ($(DEB_HOST_ARCH),amd64)
|
|
|
|
for _file in wine64 wine64-preloader; do \
|
|
|
|
ln -s "/opt/wine-staging/bin/$$_file" "debian/winehq-staging/usr/bin/$$_file"; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Compat symlinks for desktop file
|
|
|
|
mkdir -p "debian/winehq-staging/usr/share/applications"
|
|
|
|
for _file in $$(ls "debian/wine-staging/opt/wine-staging/share/applications"); do \
|
|
|
|
ln -s "/opt/wine-staging/share/applications/$$_file" "debian/winehq-staging/usr/share/applications/$$_file"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# Compat manpages
|
|
|
|
for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \
|
|
|
|
mkdir -p "debian/winehq-staging/usr/share/man/$$_dir"; \
|
|
|
|
if [ -d "debian/wine-staging/opt/wine-staging/share/man/$$_dir" ]; then \
|
|
|
|
for _file in $$(ls "debian/wine-staging/opt/wine-staging/share/man/$$_dir"); do \
|
|
|
|
ln -s "/opt/wine-staging/share/man/$$_dir/$$_file" "debian/winehq-staging/usr/share/man/$$_dir/$$_file"; \
|
|
|
|
done; \
|
|
|
|
fi; \
|
|
|
|
ln -s "/opt/wine-staging/share/man/$$_dir/wine.1" "debian/winehq-staging/usr/share/man/$$_dir/wine.1"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# Generate list of recommendations
|
|
|
|
# ifeq ($(DEB_HOST_ARCH),amd64)
|
|
|
|
# ./debian/recommendations.sh "-m64" "include/config.h" "debian/wine-staging-amd64.substvars"
|
|
|
|
# else ifeq ($(DEB_HOST_ARCH),armhf)
|
|
|
|
# ./debian/recommendations.sh "-m32" "include/config.h" "debian/wine-staging-arm.substvars"
|
|
|
|
# else
|
|
|
|
# ./debian/recommendations.sh "-m32" "include/config.h" "debian/wine-staging-i386.substvars"
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
|
|
|
override_dh_strip:
|
|
|
|
dh_strip -Xwine-pthread -Xwine-kthread --dbg-package=wine-staging-dbg
|
|
|
|
|
|
|
|
|
|
|
|
override_dh_shlibdeps:
|
|
|
|
ifeq ($(DEB_HOST_ARCH),amd64)
|
|
|
|
dh_shlibdeps -l $(CURDIR)/debian/tmp/opt/wine-staging/lib64/
|
|
|
|
else
|
|
|
|
dh_shlibdeps -l $(CURDIR)/debian/tmp/opt/wine-staging/lib/
|
|
|
|
endif
|