summaryrefslogtreecommitdiff
path: root/fluxbox/debian/rules.d
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-11-09 16:04:18 -0500
committerB. Stack <bgstack15@gmail.com>2022-11-09 16:04:18 -0500
commitf183cfec8b565beeafd93f8f8b76a23fa71e78ff (patch)
tree654464b353c105428b65355a80d1322a2301483c /fluxbox/debian/rules.d
parentMerge branch 'freefilesync-bump' into 'master' (diff)
downloadstackrpms-f183cfec8b565beeafd93f8f8b76a23fa71e78ff.tar.gz
stackrpms-f183cfec8b565beeafd93f8f8b76a23fa71e78ff.tar.bz2
stackrpms-f183cfec8b565beeafd93f8f8b76a23fa71e78ff.zip
add fluxbox
Diffstat (limited to 'fluxbox/debian/rules.d')
-rw-r--r--fluxbox/debian/rules.d/001-constants.mk7
-rw-r--r--fluxbox/debian/rules.d/010-configure-flags.mk23
-rw-r--r--fluxbox/debian/rules.d/050-configure_override.mk20
-rw-r--r--fluxbox/debian/rules.d/050-install_override.mk20
4 files changed, 70 insertions, 0 deletions
diff --git a/fluxbox/debian/rules.d/001-constants.mk b/fluxbox/debian/rules.d/001-constants.mk
new file mode 100644
index 0000000..2a4c680
--- /dev/null
+++ b/fluxbox/debian/rules.d/001-constants.mk
@@ -0,0 +1,7 @@
+# Some basic constants we'll use in the build process.
+
+DEB_CONFIGURE_SYSCONFDIR := /etc/X11/fluxbox
+DEB_STYLE_DIR := /usr/share/fluxbox/styles/
+
+VERSION = $(shell dpkg-parsechangelog|grep ^Version|awk '{print $$2}' \
+ |sed 's/-[[:digit:]]\+$$//')
diff --git a/fluxbox/debian/rules.d/010-configure-flags.mk b/fluxbox/debian/rules.d/010-configure-flags.mk
new file mode 100644
index 0000000..95f3dce
--- /dev/null
+++ b/fluxbox/debian/rules.d/010-configure-flags.mk
@@ -0,0 +1,23 @@
+# configure flags
+
+DEB_CONFIGURE_EXTRA_FLAGS := \
+ --enable-nls \
+ --enable-xft \
+ --prefix=/usr \
+ --enable-shape \
+ --enable-fribidi \
+ --enable-xinerama \
+ --with-locale=/usr/share/fluxbox/nls \
+ --with-apps=$(DEB_CONFIGURE_SYSCONFDIR)/apps \
+ --with-keys=$(DEB_CONFIGURE_SYSCONFDIR)/keys \
+ --with-init=$(DEB_CONFIGURE_SYSCONFDIR)/init \
+ --with-overlay=$(DEB_CONFIGURE_SYSCONFDIR)/overlay \
+ --with-menu=$(DEB_CONFIGURE_SYSCONFDIR)/fluxbox.menu-user \
+ --with-windowmenu=$(DEB_CONFIGURE_SYSCONFDIR)/window.menu
+
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
+FFLAGS := $(shell dpkg-buildflags --get FFLAGS)
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+export CFLAGS CPPFLAGS CXXFLAGS FFLAGS LDFLAGS
diff --git a/fluxbox/debian/rules.d/050-configure_override.mk b/fluxbox/debian/rules.d/050-configure_override.mk
new file mode 100644
index 0000000..a7c6907
--- /dev/null
+++ b/fluxbox/debian/rules.d/050-configure_override.mk
@@ -0,0 +1,20 @@
+# Intercept the configure stage to throw it some flags.
+
+FLUXBOX_VENDOR := $(shell \
+ if dpkg-vendor --derives-from Ubuntu; then \
+ echo Ubuntu; \
+ else \
+ echo Debian; \
+ fi \
+)
+
+THEME_DEFAULT := $(shell \
+ cat ./debian/additional-themes/defaults | \
+ grep ^$(FLUXBOX_VENDOR) | \
+ awk '{print $$2}' \
+)
+
+DEB_CONFIGURE_EXTRA_FLAGS += -with-style=$(DEB_STYLE_DIR)/$(THEME_DEFAULT)
+
+override_dh_auto_configure:
+ ./configure $(DEB_CONFIGURE_EXTRA_FLAGS)
diff --git a/fluxbox/debian/rules.d/050-install_override.mk b/fluxbox/debian/rules.d/050-install_override.mk
new file mode 100644
index 0000000..cfa883f
--- /dev/null
+++ b/fluxbox/debian/rules.d/050-install_override.mk
@@ -0,0 +1,20 @@
+# We're going to intercept the install stage so we can hack up
+# some files.
+
+override_dh_auto_install_pre:
+ dh_auto_install
+
+override_dh_auto_install_clean:
+ rm -f ./debian/fluxbox/usr/bin/fluxbox-generate_menu
+ perl debian/update-init.pl \
+ debian/fluxbox$(DEB_CONFIGURE_SYSCONFDIR)/init
+
+override_dh_auto_install_theme:
+ cd ./debian/additional-themes && make
+ cd ./debian/additional-themes && make install
+ cd ./debian/additional-themes && make clean
+
+override_dh_auto_install: \
+ override_dh_auto_install_pre \
+ override_dh_auto_install_theme \
+ override_dh_auto_install_clean
bgstack15