pipewire/debian/rules

174 lines
3.6 KiB
Plaintext
Raw Normal View History

2024-07-25 19:20:18 +02:00
#!/usr/bin/make -f
2024-07-25 17:13:16 +02:00
%:
dh $@
2024-07-25 19:20:18 +02:00
ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
DOCS=disabled
MAN=disabled
else
DOCS=enabled
MAN=enabled
endif
built_binaries := $(shell dh_listpackages)
ifneq ($(filter %-tests,$(built_binaries)),)
INSTTEST=enabled
SDL2=enabled
else
INSTTEST=disabled
SDL2=disabled
endif
### PikaOS changes
# LDAC Arch Check
ifneq (,$(filter s390x hppa m68k powerpc ppc64 sparc64,$(DEB_HOST_ARCH)))
BLUEZ5_CODEC_LDAC=disabled
else
BLUEZ5_CODEC_LDAC=enabled
endif
# LIBCAMERA Arch Check
ifneq (,$(filter m68k hurd-amd64 hurd-i386,$(DEB_HOST_ARCH)))
LIBCAMERA=disabled
else
LIBCAMERA=enabled
endif
2024-07-25 19:32:21 +02:00
# ROC Arch Check
2024-07-25 19:20:18 +02:00
ifneq (,$(filter hppa i386 i686 m68k powerpc sparc64,$(DEB_HOST_ARCH)))
2024-07-25 19:32:21 +02:00
ROC=disabled
cmnt_roc=$(shell sed -e '/module-roc-s/ s/^\#*/\#/' -i debian/libpipewire-0.3-modules.install)
2024-07-25 19:20:18 +02:00
else
2024-07-25 19:32:21 +02:00
ROC=enabled
2024-07-25 19:20:18 +02:00
endif
# APTX Arch Check
ifneq (,$(filter hppa i386 i686 m68k powerpc sparc64,$(DEB_HOST_ARCH)))
APTX=disabled
else
APTX=enabled
endif
# AAC Arch Check
ifneq (,$(filter hppa i386 i686 m68k powerpc sparc64,$(DEB_HOST_ARCH)))
AAC=disabled
else
AAC=enabled
endif
# LTO Arch Check
ifneq (,$(filter armhf hppa i386 i686 m68k powerpc sparc64,$(DEB_HOST_ARCH)))
2024-07-25 19:41:11 +02:00
LTO=false
2024-07-25 19:38:25 +02:00
else
2024-07-25 19:41:11 +02:00
LTO=true
2024-07-25 19:20:18 +02:00
endif
# COMPRESS Arch Check
ifneq (,$(filter i386,$(DEB_HOST_ARCH)))
COMPRESS_OFFLOAD=disabled
else
COMPRESS_OFFLOAD=enabled
endif
2024-07-25 19:32:21 +02:00
# LC3 Arch Check
ifneq (,$(filter i386,$(DEB_HOST_ARCH)))
LC3=disabled
else
2024-07-25 19:38:25 +02:00
LC3=enabled
2024-07-25 19:32:21 +02:00
endif
2024-07-25 19:20:18 +02:00
# Just always have vulkan
2024-07-25 19:32:21 +02:00
VULKAN=enabled
# No Snap
SNAP=disabled
2024-07-25 19:20:18 +02:00
### End of PikaOS Changes
LV2=enabled
LIBMYSOFA=enabled
LIBFFADO=enabled
ifneq (,$(filter hurd-amd64 hurd-i386,$(DEB_HOST_ARCH)))
UDEVRULESDIR=
else
export UDEVRULESDIR=/usr/lib/udev/rules.d
# For pre-Trixie releases udev rules should go in:
# export UDEVRULESDIR=/lib/udev/rules.d
endif
override_dh_auto_configure:
dh_auto_configure -- \
-Daudiotestsrc=enabled \
-Dauto_features=enabled \
-Db_lto=$(LTO) \
-Davahi=enabled \
-Dbluez5-backend-native-mm=enabled \
-Dbluez5-codec-aac=$(AAC) \
-Dbluez5-codec-aptx=$(APTX) \
2024-07-25 19:35:12 +02:00
-Dbluez5-codec-lc3=$(LC3) \
2024-07-25 19:20:18 +02:00
-Dbluez5-codec-lc3plus=disabled \
-Dbluez5-codec-ldac=$(BLUEZ5_CODEC_LDAC) \
-Dbluez5-codec-opus=enabled \
-Dlibcamera=$(LIBCAMERA) \
-Dlibffado=$(LIBFFADO) \
-Dlibmysofa=$(LIBMYSOFA) \
-Ddocs=$(DOCS) \
-Dffmpeg=disabled \
-Dinstalled_tests=$(INSTTEST) \
-Dlv2=$(LV2) \
-Dman=$(MAN) \
-Dsdl2=$(SDL2) \
-Dsession-managers= \
-Dsnap=$(SNAP) \
-Dtest=enabled \
-Dudevrulesdir=$(UDEVRULESDIR) \
-Dvideotestsrc=enabled \
2024-07-25 19:32:21 +02:00
-Dvulkan=$(VULKAN) \
-Droc=$(ROC) \
2024-07-25 19:20:18 +02:00
$(NULL)
2024-08-09 23:28:24 +02:00
2024-07-25 19:20:18 +02:00
install -d debian/ld.so.conf.d
echo "/usr/lib/$(DEB_HOST_MULTIARCH)/pipewire-0.3/jack/" > "debian/ld.so.conf.d/pipewire-jack-$(DEB_HOST_MULTIARCH).conf"
2024-07-25 19:47:23 +02:00
echo -e "\nCommenting out Disabled feature not to be installed... $(cmnt_libroc)\n"
2024-07-25 19:20:18 +02:00
test_timeout_multiplier = 1
ifneq ($(filter arm hppa ia64 m68k riscv64 sh4 sparc%,$(DEB_HOST_ARCH_CPU)),)
test_timeout_multiplier = 5
endif
ifneq ($(filter mips%,$(DEB_HOST_ARCH_CPU)),)
test_timeout_multiplier = 10
endif
override_dh_auto_test:
dh_auto_test \
-- \
--timeout-multiplier $(test_timeout_multiplier) \
$(NULL)
override_dh_makeshlibs:
dh_makeshlibs \
--exclude=/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0 \
--exclude=/usr/lib/$(DEB_HOST_MULTIARCH)/pipewire-0.3 \
--exclude=/usr/lib/$(DEB_HOST_MULTIARCH)/spa-0.2 \
-- -c4
override_dh_shlibdeps-arch:
dh_shlibdeps \
-ppipewire-jack \
-l/usr/lib/$(DEB_HOST_MULTIARCH)/pipewire-0.3 \
-- \
-Ldebian/pipewire-jack.shlibs.local \
$(NULL)
dh_shlibdeps \
--remaining-packages \
-l/usr/lib/$(DEB_HOST_MULTIARCH)/pipewire-0.3 \
$(NULL)