diff --git a/Makefile b/Makefile index 4f605e7..63310b2 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,39 @@ -all: out/dropbear.hmod -out/dropbear.hmod: mod/bin/dropbear - [ -f "out/dropbear.hmod" ] || tar -czvf out/dropbear.hmod -C mod bin etc +GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`") -mod/bin/dropbear: src/dropbear-2015.68/dropbear - mkdir -p mod/bin - [ -f mod/bin/dropbear ] || upx --ultra-brute src/dropbear-2015.68/dropbear -o mod/bin/dropbear - chmod +x mod/bin/dropbear +all: out/dropbear-$(GIT_COMMIT).hmod -src/dropbear-2015.68.tar.bz2: - mkdir -p src - wget https://github.com/DanTheMan827/dropbear.hmod/releases/download/tarballs/dropbear-2015.68.tar.bz2 -O src/dropbear-2015.68.tar.bz2 +out/dropbear-$(GIT_COMMIT).hmod: mod/bin/dropbear + mkdir -p "out" + chmod +x mod/etc/init.d/* + tar -czvf "$@" -C "mod" "bin" "etc" + touch "$@" -src/dropbear-2015.68/configure: src/dropbear-2015.68.tar.bz2 - [ -f src/dropbear-2015.68/configure ] || tar -xjvf src/dropbear-2015.68.tar.bz2 -C src/ +mod/bin/dropbear: src/dropbear-2015.68/dropbear + mkdir -p "mod/bin" + upx --ultra-brute "$<" -o "$@" + chmod +x "$@" + touch "$@" src/dropbear-2015.68/Makefile: src/dropbear-2015.68/configure - cd src/dropbear-2015.68; \ + cd "src/dropbear-2015.68"; \ ./configure --host=arm-linux-gnueabihf --prefix=/ --disable-zlib CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld + touch "$@" src/dropbear-2015.68/dropbear: src/dropbear-2015.68/Makefile - make -C src/dropbear-2015.68 + make -C "src/dropbear-2015.68" + +src/dropbear-2015.68/configure: src/dropbear-2015.68.tar.bz2 + tar -xjvf "$<" -C "src/" + touch "$@" + +src/dropbear-2015.68.tar.bz2: + mkdir -p "src/" + wget https://github.com/DanTheMan827/dropbear.hmod/releases/download/tarballs/dropbear-2015.68.tar.bz2 -O "$@" + +clean: clean-hmod + -rm -rf "src/" -clean: - -rm -rf "out/" "mod/bin/dropbear" "src/" +clean-hmod: + -rm -rf "out/" "mod/bin/dropbear" -.PHONY: all clean +.PHONY: all clean clean-hmod diff --git a/mod/etc/avahi/services/ssh.service b/mod/etc/avahi/services/ssh.service index cd6b8e8..dd24e29 100644 --- a/mod/etc/avahi/services/ssh.service +++ b/mod/etc/avahi/services/ssh.service @@ -6,4 +6,4 @@ _ssh._tcp 22 - + \ No newline at end of file