Last active
July 29, 2018 13:03
-
-
Save andrey-utkin/96d6070c27ab670861fa4bb5f6ac3bd2 to your computer and use it in GitHub Desktop.
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
--- hostapd-9999.ebuild 2018-07-29 13:25:09.438124204 +0100 | |
+++ hostapd-2.6_p20180728.ebuild 2018-07-29 14:03:32.033015313 +0100 | |
@@ -14,6 +14,14 @@ | |
if [[ $PV == 9999 ]]; then | |
inherit git-r3 | |
EGIT_REPO_URI="https://w1.fi/hostap.git" | |
+elif [[ $PV =~ ^.*_p[0-9]{8}$ ]]; then | |
+ EGIT_REPO_URI="https://w1.fi/hostap.git" | |
+ DATE=${PV/*_p/} | |
+ EGIT_COMMIT_DATE="${DATE:0:4}-${DATE:4:2}-${DATE:6:2}" | |
+ unset DATE | |
+ inherit git-r3 | |
+ # Snapshot ebuilds currently are not considered for stabilization | |
+ KEYWORDS="~amd64" | |
else | |
SRC_URI+="https://w1.fi/releases/${P}.tar.gz" | |
KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" | |
@@ -51,9 +59,9 @@ | |
} | |
src_unpack() { | |
- # Override default one because we need the SRC_URI ones even in case of 9999 ebuilds | |
+ # Override default one because we need the SRC_URI ones even in case of git ebuilds | |
default | |
- if [[ ${PV} == 9999 ]] ; then | |
+ if [[ -n "${EGIT_REPO_URI}" ]]; then | |
git-r3_src_unpack | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment