This repository has been archived by the owner on May 9, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
addd439
commit 8823c21
Showing
2 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
<type>_ssh._tcp</type> | ||
<port>22</port> | ||
</service> | ||
</service-group> | ||
</service-group> |