diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | actions/Makefile.am | 23 | ||||
-rwxr-xr-x | actions/build_deb.sh | 30 | ||||
-rw-r--r-- | compile_commands.json | 154 | ||||
-rw-r--r-- | configure.ac | 1 |
5 files changed, 179 insertions, 31 deletions
diff --git a/Makefile.am b/Makefile.am index d9c21c6..d189681 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src docs data nsis spec +SUBDIRS = src actions docs data nsis spec dist_man_MANS = man man1_MANS = man/$(PACKAGE_NAME).1 man5_MANS = man/$(PACKAGE_NAME)-config.5 diff --git a/actions/Makefile.am b/actions/Makefile.am new file mode 100644 index 0000000..a27b73d --- /dev/null +++ b/actions/Makefile.am @@ -0,0 +1,23 @@ +DEBUILD_ARGS = +SAVE_CONTAINER = no + +clean-local: + -rm -rf build/ + +.PHONY: actions_build_deb +actions_build_deb: IMAGE_NAME = debian +actions_build_deb: IMAGE_VERSION = unstable +actions_build_deb: CONTAINER_NAME = $(PACKAGE_NAME)_$@_$(IMAGE_NAME)-$(IMAGE_VERSION) +actions_build_deb: DEPENDENCY_LIST = autoconf-archive debmake devscripts ncurses-dev pkg-config +actions_build_deb: ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz + podman pull docker.io/library/$(IMAGE_NAME):$(IMAGE_VERSION) + podman container exists "$(CONTAINER_NAME)" || podman run -itd --name "$(CONTAINER_NAME)" "$(IMAGE_NAME):$(IMAGE_VERSION)" + podman exec "$(CONTAINER_NAME)" mkdir -p /tmp/build + podman cp "../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz" "$(CONTAINER_NAME)":/tmp/build + podman exec -w /tmp/build "$(CONTAINER_NAME)" apt-get -y update + podman exec -w /tmp/build "$(CONTAINER_NAME)" apt-get -y upgrade + podman exec -w /tmp/build "$(CONTAINER_NAME)" apt install -y $(DEPENDENCY_LIST) + podman exec -w /tmp/build "$(CONTAINER_NAME)" debmake -y -a $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz -i debuild $(DEBUILD_ARGS) + mkdir -p "build/$@/$(IMAGE_NAME)-$(IMAGE_VERSION)" + podman cp "$(CONTAINER_NAME)":/tmp/build/. "build/$@/$(IMAGE_NAME)-$(IMAGE_VERSION)/" + test "$(SAVE_CONTAINER)" = "no" && (podman kill "$(CONTAINER_NAME)" && podman rm "$(CONTAINER_NAME)") diff --git a/actions/build_deb.sh b/actions/build_deb.sh deleted file mode 100755 index 2055f6e..0000000 --- a/actions/build_deb.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env sh - -CONTAINER_NAME="build_deb" -IMAGE_NAME="$1" - -DEPENDENCY_LIST="autoconf-archive debmake devscripts ncurses-dev pkg-config" - -if [ -z "$IMAGE_NAME" ]; then - IMAGE_NAME="debian:unstable" -fi - -podman pull docker.io/library/"$IMAGE_NAME" - -podman run -itd --name "$CONTAINER_NAME" "$IMAGE_NAME" - -make -C "$(dirname "$0")/.." dist -podman exec "$CONTAINER_NAME" mkdir -p /tmp/build -podman cp terminal-media-launcher*.tar.gz "$CONTAINER_NAME":/tmp/build - -podman exec -w /tmp/build "$CONTAINER_NAME" apt-get -y update -podman exec -w /tmp/build "$CONTAINER_NAME" apt-get -y upgrade -podman exec -w /tmp/build "$CONTAINER_NAME" apt install -y $DEPENDENCY_LIST -podman exec -w /tmp/build "$CONTAINER_NAME" debmake -y -a terminal-media-launcher-0.1.tar.gz -i debuild - -mkdir -p "$(dirname "$0")/build" - -podman cp "$CONTAINER_NAME":/tmp/build/. "$(dirname "$0")/build/" - -podman kill "$CONTAINER_NAME" -podman rm "$CONTAINER_NAME" diff --git a/compile_commands.json b/compile_commands.json new file mode 100644 index 0000000..cfbbf2d --- /dev/null +++ b/compile_commands.json @@ -0,0 +1,154 @@ +[ + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "terminal_media_launcher-cache.o", + "cache.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/cache.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/terminal_media_launcher-cache.o" + }, + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "terminal_media_launcher-draw.o", + "draw.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/draw.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/terminal_media_launcher-draw.o" + }, + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "terminal_media_launcher-read_cfg.o", + "read_cfg.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/read_cfg.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/terminal_media_launcher-read_cfg.o" + }, + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "terminal_media_launcher-group.o", + "group.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/group.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/terminal_media_launcher-group.o" + }, + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "terminal_media_launcher-entry.o", + "entry.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/entry.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/terminal_media_launcher-entry.o" + }, + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "unix/terminal_media_launcher-cache.o", + "unix/cache.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/unix/cache.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/unix/terminal_media_launcher-cache.o" + }, + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "unix/terminal_media_launcher-draw.o", + "unix/draw.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/unix/draw.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/unix/terminal_media_launcher-draw.o" + }, + { + "arguments": [ + "/usr/bin/gcc", + "-DHAVE_CONFIG_H", + "-I.", + "-I..", + "-D_DEFAULT_SOURCE", + "-D_XOPEN_SOURCE=600", + "-g", + "-O2", + "-c", + "-o", + "unix/terminal_media_launcher-read_cfg.o", + "unix/read_cfg.c" + ], + "directory": "/home/louie/Documents/code/terminal-media-launcher/source/src", + "file": "/home/louie/Documents/code/terminal-media-launcher/source/src/unix/read_cfg.c", + "output": "/home/louie/Documents/code/terminal-media-launcher/source/src/unix/terminal_media_launcher-read_cfg.o" + } +] diff --git a/configure.ac b/configure.ac index a340433..5cfe45f 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,7 @@ AM_CONDITIONAL([EMBED_ICON], [test "$embed_icon" = "yes"]) AC_CONFIG_FILES([Makefile src/Makefile + actions/Makefile docs/Makefile data/Makefile nsis/Makefile |