summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..df0f5f4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+.PHONY: all
+.DEFAULT_GOAL: all
+all: create build
+
+VERSION=1
+PKG_NAME=dwmblocks
+PKG_FOLDER=$(PKG_NAME)-package
+PKG_URL=https://git.vasthecat.ru/$(PKG_NAME).git
+SRC=$(PKG_NAME)-src
+PREFIX=/usr
+
+$(SRC):
+ git clone "$(PKG_URL)" "$(SRC)"
+
+$(PKG_FOLDER):
+ mkdir -p "$(PKG_FOLDER)$(PREFIX)/bin"
+ cp -r "DEBIAN" "$(PKG_FOLDER)"
+
+create: $(SRC) $(PKG_FOLDER)
+ make -C "$(SRC)"
+ cp -f $(SRC)/dwmblocks $(PKG_FOLDER)$(PREFIX)/bin
+ chmod 755 $(PKG_FOLDER)$(PREFIX)/bin/dwmblocks
+
+build:
+ fakeroot dpkg-deb --build "$(PKG_FOLDER)"
+
+clean:
+ rm -rf dwmblocks-*
+