Debianize scripts

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: If168763ced7c37a5816cb10b9cd934dfac1dab87
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a895999
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+libvideorender (2025.01) stable; urgency=medium
+
+  * Apply Amlogic BSP (v2025.01)
+
+ -- Dongjin Kim <tobetter@gmail.com>  Mon, 20 Jan 2025 07:54:07 +0000
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d9bf67b
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,32 @@
+Source: libvideorender
+Priority: optional
+Maintainer: Dongjin Kim <tobetter@gmail.com>
+Uploaders: Dongjin Kim <tobetter@gmail.com>
+Build-Depends: debhelper-compat (= 13),
+  libdrm-meson-dev,
+  liblog1-dev,
+  pkg-config,
+Standards-Version: 4.6.0
+
+Package: libvideorender-drm
+Section: misc
+Architecture: linux-any
+Depends:
+  ${misc:Depends}
+Multi-Arch: same
+Description: ...
+
+Package: libvideorender-weston
+Section: misc
+Architecture: linux-any
+Depends:
+  ${misc:Depends}
+Multi-Arch: same
+Description: ...
+
+Package: libvideorender-dev
+Section: misc
+Architecture: linux-any
+Depends:
+  libvideorender-drm | libvideorender-weston
+Description: ...
diff --git a/debian/libvideorender-dev.install b/debian/libvideorender-dev.install
new file mode 100644
index 0000000..ef12e2c
--- /dev/null
+++ b/debian/libvideorender-dev.install
@@ -0,0 +1 @@
+render_plugin.h			/usr/include
diff --git a/debian/libvideorender-weston.install b/debian/libvideorender-weston.install
new file mode 100644
index 0000000..bec42aa
--- /dev/null
+++ b/debian/libvideorender-weston.install
@@ -0,0 +1 @@
+weston/libvideorender_client.so		/usr/lib/${DEB_HOST_MULTIARCH}/
diff --git a/debian/not-installed b/debian/not-installed
new file mode 100644
index 0000000..5b0644d
--- /dev/null
+++ b/debian/not-installed
@@ -0,0 +1 @@
+usr/lib/${DEB_HOST_MULTIARCH}/*.la
diff --git a/debian/patches/0001-Fix-compile-error.patch b/debian/patches/0001-Fix-compile-error.patch
new file mode 100644
index 0000000..a33e827
--- /dev/null
+++ b/debian/patches/0001-Fix-compile-error.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile b/Makefile
+index 57555db..b71e346 100644
+diff --git a/drm/Makefile b/drm/Makefile
+index 418023d..5d12b54 100644
+--- a/drm/Makefile
++++ b/drm/Makefile
+@@ -82,7 +82,6 @@ LD_FLAG_LIB = $(LD_FLAG) -shared $(LD_SUPPORT) -llog -ldrm
+ 
+ $(CLIENT_LIB): $(OBJ_CLIENT_LIB)
+ 	$(CXX) -o $(OUT_DIR)/$@ $(patsubst %, $(OUT_DIR)/%, $^) $(LD_FLAG_LIB)
+-	cp -f $(OUT_DIR)/$(CLIENT_LIB) $(STAGING_DIR)/usr/lib
+ 	rm -f $(patsubst %, $(OUT_DIR)/%, $(OBJ_CLIENT_LIB))
+ 
+ .PHONY: install
+diff --git a/weston/Makefile b/weston/Makefile
+index 92c3670..dd6cf1c 100644
+--- a/weston/Makefile
++++ b/weston/Makefile
+@@ -123,7 +123,6 @@ LD_FLAG_LIB = $(LD_FLAG) -shared $(LD_SUPPORT) -llog
+ 
+ $(CLIENT_LIB): $(OBJ_CLIENT_LIB)
+ 	$(CXX) -o $(OUT_DIR)/$@ $(patsubst %, $(OUT_DIR)/%, $^) $(LD_FLAG_LIB)
+-	cp -f $(OUT_DIR)/$(CLIENT_LIB) $(STAGING_DIR)/usr/lib
+ 
+ $(PROTOCOL_PATH)/%-protocol.c : $(PROTOCOL_PATH)/%.xml
+ 	echo $(@)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6f21187
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-compile-error.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ff25f61
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+override_dh_auto_configure:
+	true
+
+override_dh_auto_build:
+	for target in drm weston; do \
+		make -C $$target all; \
+	done
+
+override_dh_auto_install:
+	true
+
+%:
+	dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)