From dc85a3fbe0b840f13268ced6c0fb0afbd741a927 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Thu, 8 Dec 2016 00:28:25 +0100 Subject: [PATCH] Update hostapd, use create_ap releases instead of git --- satellites/create_ap-git.sat | 13 ------------- satellites/create_ap.sat | 16 ++++++++++++++++ satellites/functions/vcs/git.sh | 11 +++++++---- satellites/hostapd.sat | 6 ++++++ 4 files changed, 29 insertions(+), 17 deletions(-) delete mode 100644 satellites/create_ap-git.sat create mode 100644 satellites/create_ap.sat diff --git a/satellites/create_ap-git.sat b/satellites/create_ap-git.sat deleted file mode 100644 index 8db018b..0000000 --- a/satellites/create_ap-git.sat +++ /dev/null @@ -1,13 +0,0 @@ -import 'vcs/git' - -name=create_ap - -vcs_git "https://github.com/oblique/$name" -header_end - -cd "$name" -install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "$name" -install -Dm644 -t "$dir_install/$dir_sysconfdir" "$name.conf" -install -Dm644 -t "$dir_install/$dir_prefix/$dir_datadir/bash-completion/$name" bash_completion - -# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: diff --git a/satellites/create_ap.sat b/satellites/create_ap.sat new file mode 100644 index 0000000..5b4e0d1 --- /dev/null +++ b/satellites/create_ap.sat @@ -0,0 +1,16 @@ +name=create_ap +version=0.4.6 +update_url="https://github.com/oblique/$name/releases" +update_names="/archive/v$version.tar.gz" + +dlextract "https://github.com/oblique/$name/archive/v$version.tar.gz" \ + '4eaa1200204542670458cc7e9411b651' +header_end + +cd "$name-$version" +install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "$name" +install -Dm644 -t "$dir_install/$dir_sysconfdir" "$name.conf" +install -Dm644 -t "$dir_install/$dir_prefix/$dir_datadir/bash-completion/$name" bash_completion +install -Dm644 -t "$dir_install/$dir_prefix/$dir_docdir/$name" README.md + +# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: diff --git a/satellites/functions/vcs/git.sh b/satellites/functions/vcs/git.sh index 442cfe0..f265d9f 100644 --- a/satellites/functions/vcs/git.sh +++ b/satellites/functions/vcs/git.sh @@ -1,11 +1,14 @@ vcs_git() { - local reponame="$(basename "$1")"; shift - local branch="$(basename "$1")" + local url="$1"; shift + local branch="$1" + + local reponame="$(basename "$url")" local dir="$dir_source/$name/$reponame" + mkdir -p "$dir" - if [ ! -d "$dir" ]; then + if [ ! -d "$dir/.git" ]; then # Clone new repo - git clone --recursive --depth=1 $([ "$branch" ] && echo "-b $branch")"$1" "$dir" + git clone --recursive --depth=1 $([ "$branch" ] && echo "-b $branch") "$url" "$dir" cd "$dir" echo "$(git rev-parse @)" > "${dir}_rev_$_satname" vcs_compile=true diff --git a/satellites/hostapd.sat b/satellites/hostapd.sat index 66db445..7d1bc24 100644 --- a/satellites/hostapd.sat +++ b/satellites/hostapd.sat @@ -20,6 +20,12 @@ cd "$name" cp defconfig .config option rtlxdrv echo CONFIG_DRIVER_RTW=y >> .config make + install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "$name" "${name}_cli" +install -Dm644 -t "$dir_install/$dir_prefix/$dir_mandir/man1" "${name}_cli.1" +install -Dm644 -t "$dir_install/$dir_prefix/$dir_mandir/man8" "${name}.8" +install -Dm644 -t "$dir_install/$dir_prefix/$dir_docdir/$name" \ + $name.accept $name.conf $name.deny $name.eap_user $name.radius_clients \ + $name.sim_db $name.vlan $name.wpa_psk wired.conf hlr_auc_gw.milenage_db # vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: