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