aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2025-12-13 23:24:57 -0500
committerSteph Enders <steph@senders.io>2025-12-13 23:24:57 -0500
commit9e143acfdfc9e69997d46c71cc52a0947d572a2c (patch)
tree40dd96d5dba3310a139a2eb1638ef37f27831bbe /Makefile
parent599a9a05228a2c61055b52ba08288cfc7421c2af (diff)
Create install process via make
Running `sudo make install` will install to /usr/local installing all of the scripts as well as the documentation, setting the release version for everything as well
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a5f3be7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,38 @@
+DESTDIR?=/
+PREFIX=/usr/local
+
+.PHONY: build install
+
+clean:
+ rm -rf build
+
+setup: clean
+ mkdir -p build
+
+release:
+ cp docs/*.[1-9] build/
+ sed -i "s/[{]RELEASE[}]/$(cat VERSION)/1" build/*.*
+
+gzip:
+ gzip build/*.1
+ gzip build/*.5
+
+build: setup release gzip
+
+install: build
+ @install -Dm644 build/ssync.1.gz \
+ ${DESTDIR}${PREFIX}/share/man/man1/ssync.1.gz
+ @install -Dm644 build/ssync-index.1.gz \
+ ${DESTDIR}${PREFIX}/share/man/man1/ssync-index.1.gz
+ @install -Dm644 build/ssync-queue.1.gz \
+ ${DESTDIR}${PREFIX}/share/man/man1/ssync-queue.1.gz
+ @install -Dm644 build/ssync-fetch.1.gz \
+ ${DESTDIR}${PREFIX}/share/man/man1/ssync-fetch.1.gz
+ @install -Dm644 build/ssync.5.gz \
+ ${DESTDIR}${PREFIX}/share/man/man5/ssync.5.gz
+ @install -Dm755 ssync ${DESTDIR}${PREFIX}/bin/ssync
+ @install -Dm755 ssync-index ${DESTDIR}${PREFIX}/bin/ssync-index
+ @install -Dm755 ssync-queue ${DESTDIR}${PREFIX}/bin/ssync-queue
+ @install -Dm755 ssync-fetch ${DESTDIR}${PREFIX}/bin/ssync-fetch
+ @install -Dm644 LICENSE ${DESTDIR}${PREFIX}/share/licenses/ssync/LICENSE
+