Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
👷 Added deb build to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Beta Pictoris committed Apr 17, 2022
1 parent 15d3e2e commit 7edb075
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
all:
mkdir -vp build
make binary
make deb

binary:
go build -o build/dict ./main.go

deb:
mkdir -vp build/dict-deb/usr/local/bin/
go build -o build/dict-deb/usr/local/bin/
mkdir -vp build/dict-deb/DEBIAN/
cp -v dict/deb/control build/dict-deb/DEBIAN/
cp -v dict/deb/postinst build/dict-deb/DEBIAN/
chmod 775 build/dict-deb/DEBIAN/postinst
dpkg-deb --build build/dict-deb

clean:
@if [ -f build ] && [ -x build ]; then rm build; fi
rm -rv build

install:
install -Dt /usr/local/bin -m 755 build/dict
install -vDt /usr/local/bin -m 755 build/dict

uninstall:
rm /usr/local/bin/dict
rm -v /usr/local/bin/dict

0 comments on commit 7edb075

Please sign in to comment.