summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-02-26 11:33:02 -0500
committerpommicket <pommicket@gmail.com>2025-02-26 11:33:02 -0500
commitefd4d46ce9a6db066e1065895f12c9567f31ad67 (patch)
tree671aae6b7ef8d1cd4a1802dc79923c03c1283e83
parent950eeb9c299c0280c357a9f9c27a3ca45b33cbce (diff)
update .deb control automatically
-rw-r--r--Makefile2
-rwxr-xr-xcontrol.sh17
-rw-r--r--main.c5
3 files changed, 18 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 05dd0e8..96d67ae 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ camlet.deb: release control
cp release/camlet tmp/camlet/usr/bin/
cp camlet.desktop tmp/camlet/usr/share/applications/
cp camlet.png tmp/camlet/usr/share/icons/hicolor/48x48/apps
- cp control tmp/camlet/DEBIAN/
+ sh control.sh > tmp/camlet/DEBIAN/control
dpkg-deb --build tmp/camlet
rm -rf tmp
install: release
diff --git a/control.sh b/control.sh
new file mode 100755
index 0000000..c2c924c
--- /dev/null
+++ b/control.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# script for generating .deb control file
+
+echo 'Package: camlet'
+echo 'Version: '$(grep '#define VERSION' main.c | cut -d'"' -f2 | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' || exit 1)
+cat <<EOF
+Section: video
+Priority: optional
+Architecture: amd64
+Essential: no
+Maintainer: pommicket <pommicket@gmail.com>
+Description: Take pictures and videos with a webcam
+Depends: libsdl2-2.0-0, libv4l-0, libudev1, libsodium23, libfontconfig1, libsdl2-ttf-2.0-0, libjpeg62-turbo, libavcodec59, libavformat59
+Homepage: https://github.com/pommicket/camlet
+EOF
+echo 'Installed-Size: '$(wc -c release/camlet camlet.png camlet.desktop | tail -n1 | cut -d' ' -f1 || exit 1)
diff --git a/main.c b/main.c
index c8c3c9d..94c5440 100644
--- a/main.c
+++ b/main.c
@@ -1,10 +1,5 @@
#define VERSION "0.0.0"
-/*
-TODO:
-- application icon (and SDL_SetWindowIcon)
-*/
-
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>