mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
refactor apt/dnf repo
This commit is contained in:
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
||||
10
|
3
debian/control.in
vendored
3
debian/control.in
vendored
@@ -1,12 +1,11 @@
|
||||
Source: hyperion
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Build-Depends: @BUILD_DEPENDS@
|
||||
Standards-Version: @STANDARDS_VERSION@
|
||||
Maintainer: Hyperion Project <admin@hyperion-project.org>
|
||||
Homepage: https://hyperion-project.org/
|
||||
|
||||
Package: hyperion
|
||||
Architecture: @ARCHITECTURE@
|
||||
Depends: @DEPENDS@
|
||||
Depends: ${dist:Depends}
|
||||
Description: Hyperion is an opensource Bias or Ambient Lighting implementation which you might know from TV manufactures. It supports many LED devices and video grabbers.
|
||||
|
17
debian/distributions
vendored
17
debian/distributions
vendored
@@ -16,7 +16,7 @@ SignWith: yes
|
||||
|
||||
Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Codename: kinetic
|
||||
Codename: lunar
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
@@ -24,8 +24,8 @@ SignWith: yes
|
||||
|
||||
Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Codename: lunar
|
||||
Architectures: amd64
|
||||
Codename: mantic
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
SignWith: yes
|
||||
@@ -52,7 +52,16 @@ Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Suite: unstable
|
||||
Codename: bookworm
|
||||
Architectures: amd64
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
SignWith: yes
|
||||
|
||||
Origin: Hyperion-Project
|
||||
Label: apt.hyperion-project.org
|
||||
Suite: testing
|
||||
Codename: trixie
|
||||
Architectures: amd64 armhf arm64
|
||||
Components: main
|
||||
Description: Official APT Repository by Hyperion Project
|
||||
SignWith: yes
|
||||
|
58
debian/rules
vendored
Normal file
58
debian/rules
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
SHELL := /bin/bash
|
||||
|
||||
BUILDDIR := build
|
||||
TARGET := debian/tmp
|
||||
|
||||
# libcec currently not linked in hyperion therefore not recognizable but hardcoded in FIND_DEPENDS
|
||||
REQUIRED_DEPS := libusb libasound libmbedtls libturbojpeg libcec
|
||||
QT5_DEPS := libqt5widgets5,libqt5x11extras5,libqt5sql5,libqt5serialport5,libqt5sql5-sqlite,
|
||||
|
||||
FIND_DEPENDS = $(shell \
|
||||
PACKAGES=(); \
|
||||
PACKAGES+=("$$(dpkg -S "libcec.so" 2>/dev/null | cut -d : -f 1 | sed '/-dev/d' | head -1)"); \
|
||||
for SHARED_LIB in $$(objdump -p $(BUILDDIR)/bin/hyperiond | awk '/NEEDED/{ print $$2 }'); do \
|
||||
PACKAGES+=("$$(dpkg -S $$(basename "$$SHARED_LIB") 2>/dev/null | cut -d : -f 1 | sed '/-dev/d' | head -1)"); \
|
||||
done; \
|
||||
RESULT=(); \
|
||||
for LIB in $(REQUIRED_DEPS); do \
|
||||
for i in "$${PACKAGES[@]}"; do \
|
||||
if [[ $$i = *"$$LIB"* ]]; then \
|
||||
RESULT+=("$$i"); \
|
||||
break; \
|
||||
fi; \
|
||||
done; \
|
||||
done; \
|
||||
printf '%s,' "$${RESULT[@]}" \
|
||||
)
|
||||
|
||||
CMAKE_ENVIRONMENT := -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
ifeq ($(shell dpkg-vendor --query Vendor),Ubuntu)
|
||||
ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),arm64)
|
||||
CMAKE_ENVIRONMENT+= -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON
|
||||
else ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),armhf)
|
||||
CMAKE_ENVIRONMENT+= -DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON
|
||||
endif
|
||||
endif
|
||||
|
||||
build:
|
||||
[ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR)
|
||||
cd $(BUILDDIR); cmake $(CMAKE_ENVIRONMENT) -DCMAKE_INSTALL_PREFIX=../$(TARGET)/usr ..
|
||||
make -j$(shell nproc) -C $(BUILDDIR)
|
||||
|
||||
binary:
|
||||
$(eval DETERMINED_DEPS=$(FIND_DEPENDS))
|
||||
cd $(BUILDDIR); cmake -P cmake_install.cmake
|
||||
rm -rf $(TARGET)/usr/include $(TARGET)/usr/lib $(TARGET)/usr/bin/flatc
|
||||
[ -d $(TARGET)/DEBIAN ] || mkdir -p $(TARGET)/DEBIAN
|
||||
cp -rf cmake/package-scripts/* $(TARGET)/DEBIAN/
|
||||
chmod 0775 $(TARGET)/DEBIAN/*
|
||||
dpkg-gencontrol -phyperion "-Vdist:Depends=$(QT5_DEPS)$(DETERMINED_DEPS)"
|
||||
dpkg-deb --build $(TARGET) ..
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) $(BUILDDIR)
|
||||
|
||||
.PHONY: build binary clean
|
32
debian/rules.in
vendored
32
debian/rules.in
vendored
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
export DH_VERBOSE = 1
|
||||
|
||||
BUILDDIR = build
|
||||
|
||||
build:
|
||||
mkdir $(BUILDDIR);
|
||||
cd $(BUILDDIR); cmake @CMAKE_ENVIRONMENT@ -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr ..
|
||||
make -j4 -C $(BUILDDIR)
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
binary-indep:
|
||||
|
||||
binary-arch:
|
||||
cd $(BUILDDIR); cmake -P cmake_install.cmake
|
||||
rm -rf debian/tmp/usr/include debian/tmp/usr/lib debian/tmp/usr/bin/flatc
|
||||
mkdir debian/tmp/DEBIAN
|
||||
cp cmake/package-scripts/postinst debian/tmp/DEBIAN
|
||||
chmod 0775 debian/tmp/DEBIAN/postinst
|
||||
cp cmake/package-scripts/preinst debian/tmp/DEBIAN
|
||||
chmod 0775 debian/tmp/DEBIAN/preinst
|
||||
cp cmake/package-scripts/prerm debian/tmp/DEBIAN
|
||||
chmod 0775 debian/tmp/DEBIAN/prerm
|
||||
dpkg-gencontrol -phyperion
|
||||
dpkg --build debian/tmp ..
|
||||
rm -rf debian/tmp $(BUILDDIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)
|
||||
|
||||
.PHONY: build binary binary-arch binary-indep clean
|
Reference in New Issue
Block a user