mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-06 08:25:01 +01:00
net-wireless/proxmark3: add 4.18994
complete rewrite of the ebuild build all firmwares tests work deps installed happy
This commit is contained in:
parent
e386c61e59
commit
153e090653
4 changed files with 393 additions and 125 deletions
|
|
@ -1,2 +1,3 @@
|
|||
DIST proxmark3-4.18218.tar.gz 31530182 BLAKE2B c26f82d468deace11b7cc0048269a7f17ca54005631bfddf55cd1d0ad957c684735ffd3e24a73fd1f5ef7de35e1a0609916d34bf0d2525053fec8b1fcb5a18db SHA512 8c89089674e349629cfa156bbf85366e28962dde7c48a9e6941c63df05417a9a8c8a06f018614e4129e4a08b954216a5e29349abceea24bf6e6fc9b498c68ecb
|
||||
DIST proxmark3-4.18341.tar.gz 31594493 BLAKE2B 8f0e1f7d69a1ebd339bdb412fe85437936b344f6c545e5747f35c0fd18e3b900388add22ed80d1113b73af0a5686eda04bcf40cee6411a14cbaeb90031339374 SHA512 af0f8d724b6e319be191b60da80edf14e3742218992c6ae6fcd8ad0aa7c26d24321f91f0d96172283708925c28e8b47919b292057aed41a51eb00c2fcb87cda2
|
||||
DIST proxmark3-4.18994.tar.gz 31699671 BLAKE2B fadc6e0829da27b295ed83857372bf16e1dfde35bee2d6fc63d8c9071d29df8d1a5b15a7fb29d8da064b6634b48e1d31f34be8afeb9a70ba6c5d4d48d6e0e41b SHA512 718809522036ebd0de880c7dc3cc9c291eac62d3d67061f6f22b7d07be4850c952b23299c45324d2537594227f787e242bcfa741c7050f416a4666aaf87e1c19
|
||||
|
|
|
|||
|
|
@ -11,34 +11,34 @@
|
|||
<flag name="firmware">build firmware to update the proxmark3 hardware</flag>
|
||||
<flag name="pm3rdv4">build proxmark3 rdv4 specific firmware instead of generic</flag>
|
||||
<flag name="qt">build support for qt graphical scope interface</flag>
|
||||
<flag name="standalone-lf-samyrun">standalone HID26 read/clone/sim</flag>
|
||||
<flag name="standalone-lf-proxbrute">standalone HID ProxII bruteforce</flag>
|
||||
<flag name="standalone-lf-hidbrute">standalone HID corporate 1000 bruteforce</flag>
|
||||
<flag name="standalone-hf-young">standalone Mifare sniff/simulation</flag>
|
||||
<flag name="standalone-hf-mattyrun">standalone Mifare sniff/clone</flag>
|
||||
<flag name="standalone-hf-cardhopper">standalone 14a based protocol</flag>
|
||||
<flag name="standalone-hf-colin">standalone Mifare ultra fast sniff/sim/clone</flag>
|
||||
<flag name="standalone-hf-bog">standalone 14a sniff with ULC/ULEV1/NTAG auth</flag>
|
||||
<flag name="standalone-dankarmulti">Load multiple standalone modes</flag>
|
||||
<flag name="standalone-hf-14asniff">HF 14a sniff to flashmem</flag>
|
||||
<flag name="standalone-hf-15sniff">HF 15693 sniff to flashmem</flag>
|
||||
<flag name="standalone-hf-aveful">MIFARE Ultralight read/simulation</flag>
|
||||
<flag name="standalone-hf-bog">standalone 14a sniff with ULC/ULEV1/NTAG auth</flag>
|
||||
<flag name="standalone-hf-cardhopper">standalone 14a based protocol</flag>
|
||||
<flag name="standalone-hf-colin">standalone Mifare ultra fast sniff/sim/clone</flag>
|
||||
<flag name="standalone-hf-craftbyte">UID stealer - Emulates scanned 14a UID</flag>
|
||||
<flag name="standalone-hf-iceclass">iCLASS 4-1 mode sim/read and dump/loclass/glitch and config to flashmem</flag>
|
||||
<flag name="standalone-hf-legic">Read/simulate Legic Prime tags (RDV4: + save to flashmem)</flag>
|
||||
<flag name="standalone-hf-legicsim">Simulate Legic Prime tags</flag>
|
||||
<flag name="standalone-hf-mattyrun">standalone Mifare sniff/clone</flag>
|
||||
<flag name="standalone-hf-mfcsim">MIFARE Classic simulate</flag>
|
||||
<flag name="standalone-hf-msdsal">(default) Read and emulate MSD Visa cards</flag>
|
||||
<flag name="standalone-hf-reblay">14A relay over BT</flag>
|
||||
<flag name="standalone-hf-tcprst">IKEA Rothult ST25TA, Standalone Master Key Dump/Emulation</flag>
|
||||
<flag name="standalone-hf-tmudford">Read and emulate ISO15693 card UID</flag>
|
||||
<flag name="standalone-hf-unisniff">Multimode HF sniffer with optional flashmem and runtime select</flag>
|
||||
<flag name="standalone-hf-young">standalone Mifare sniff/simulation</flag>
|
||||
<flag name="standalone-lf-em4100emul">Simulate predefined EM4100 tags</flag>
|
||||
<flag name="standalone-lf-em4100rswb">Read/simulate/brute/clone EM4100 tags</flag>
|
||||
<flag name="standalone-lf-em4100rwc">Read/simulate/clone EM4100 tags</flag>
|
||||
<flag name="standalone-lf-hidbrute">standalone HID corporate 1000 bruteforce</flag>
|
||||
<flag name="standalone-lf-hidfcbrute">HID Facility Code bruteforce</flag>
|
||||
<flag name="standalone-lf-icehid">LF HID / IOprox / AWID / EM4100 collector to flashmem</flag>
|
||||
<flag name="standalone-lf-nexid">Nexwatch credentials detection mode</flag>
|
||||
<flag name="standalone-lf-proxbrute">standalone HID ProxII bruteforce</flag>
|
||||
<flag name="standalone-lf-samyrun">standalone HID26 read/clone/sim</flag>
|
||||
<flag name="standalone-lf-tharexde">LF EM4x50 simulator/read standalone mode</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
|
|
|
|||
231
net-wireless/proxmark3/proxmark3-4.18994.ebuild
Normal file
231
net-wireless/proxmark3/proxmark3-4.18994.ebuild
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit udev toolchain-funcs
|
||||
|
||||
if [ "${PV}" = "9999" ]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/RfidResearchGroup/proxmark3.git"
|
||||
RESTRICT="strip"
|
||||
else
|
||||
#snapshot
|
||||
#HASH_COMMIT="1ac5211601b50b82b41737dce0c3a72d9e0374ac"
|
||||
#SRC_URI="https://github.com/RfidResearchGroup/${PN}/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
#S=${WORKDIR}/${PN}-${HASH_COMMIT}
|
||||
|
||||
#or release
|
||||
KEYWORDS="~amd64"
|
||||
SRC_URI="https://github.com/RfidResearchGroup/proxmark3/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
fi
|
||||
DESCRIPTION="A general purpose RFID tool for Proxmark3 hardware"
|
||||
HOMEPAGE="https://github.com/RfidResearchGroup/proxmark3"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="+bluez +firmware opencl +qt"
|
||||
|
||||
CDEPEND="
|
||||
app-arch/bzip2
|
||||
app-arch/lz4:=
|
||||
dev-libs/jansson:=
|
||||
dev-libs/openssl:=
|
||||
sys-libs/readline:=
|
||||
media-libs/gd:2=
|
||||
bluez? ( net-wireless/bluez:= )
|
||||
opencl? ( dev-libs/opencl-icd-loader )
|
||||
qt? ( dev-qt/qtcore:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtgui:5 )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-util/opencl-headers
|
||||
"
|
||||
RDEPEND="${CDEPEND}
|
||||
dev-python/ansicolors
|
||||
dev-python/sslcrypto
|
||||
"
|
||||
#ncurses is basically just used for termcap
|
||||
PDEPEND="sys-libs/ncurses:*[tinfo]"
|
||||
BDEPEND="firmware? ( sys-devel/gcc-arm-none-eabi:0 )"
|
||||
|
||||
QA_FLAGS_IGNORED="usr/share/proxmark3/firmware/bootrom.elf
|
||||
usr/share/proxmark3/firmware/fullimage.elf
|
||||
usr/share/proxmark3/firmware/PM3BOOTROM.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_256.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFSKELETON.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100EMUL.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100RSWB.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100RSWW.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100RWC.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFHIDBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFMULTIHID.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFNEDAP_SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFPROXBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFPROX2BRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFSAMYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF14ASNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF14BSNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF15SNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF15SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFAVEFUL.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFCRAFTBYTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFLEGIC.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFMATTYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFMSDSAL.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFTCPRST.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFTMUDFORD.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFUNISNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFYOUNG.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_DANKARMULTI.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFSKELETON.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100EMUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100RSWB.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100RSWW.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100RWC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFHIDBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFHIDFCBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFICEHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFMULTIHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFNEDAP_SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFNEXID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFPROXBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFPROX2BRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFSAMYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFTHAREXDE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF14ASNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF14BSNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF15SNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF15SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFAVEFUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFBOG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFCOLIN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFCRAFTBYTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFICECLASS.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFLEGIC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFLEGICSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFMATTYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFMFCSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFMSDSAL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFTCPRST.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFTMUDFORD.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFUNISNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFYOUNG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_DANKARMULTI.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFSKELETON.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100EMUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100RSWB.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100RSWW.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100RWC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFHIDBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFHIDFCBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFICEHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFMULTIHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFNEDAP_SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFNEXID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFPROXBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFPROX2BRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFSAMYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFTHAREXDE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF14ASNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF14BSNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF15SNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF15SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFAVEFUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFBOG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFCARDHOPPER.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFCOLIN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFCRAFTBYTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFICECLASS.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFLEGIC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFLEGICSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFMATTYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFMFCSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFMSDSAL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFREBLAY.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFTCPRST.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFTMUDFORD.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFUNISNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFYOUNG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_DANKARMULTI.elf
|
||||
"
|
||||
|
||||
src_prepare(){
|
||||
default
|
||||
build_time=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
sed -i "s#\"\$ctime\",#\"${build_time}\",#" tools/mkversion.sh || die
|
||||
}
|
||||
|
||||
src_compile(){
|
||||
export PREFIX=/usr
|
||||
#verbose
|
||||
export V=1
|
||||
#common flags
|
||||
EMAKE_COMMON=CC="$(tc-getCC)" DEFCFLAGS="${CFLAGS}" MYCFLAGS="${CFLAGS}"
|
||||
EMAKE_COMMON+= MYCXXFLAGS="${CXXFLAGS}" MYLDFLAGS="${LDFLAGS}"
|
||||
use bluez || export SKIPBT=1
|
||||
use qt || export SKIPQT=1
|
||||
use opencl || export SKIPOPENCL=1
|
||||
if use firmware; then
|
||||
#prevent repeat cleaning of things which were never built
|
||||
sed -i '/\$(Q)\$(MAKE) \-\-no-print-directory \-C recovery clean/d' Makefile || die
|
||||
sed -i '/\$(Q)\$(MAKE) \-\-no-print-directory \-C client clean/d' Makefile || die
|
||||
#prevent rebuilding fpga_compress for every firmware
|
||||
sed -i '/\$(Q)\$(MAKE) \-\-no-print-directory \-C tools\/fpga_compress clean/d' Makefile || die
|
||||
DEST="firmware" MKFLAGS="${MAKEOPTS} ${EMAKE_COMMON}" ./tools/build_all_firmwares.sh || die
|
||||
# We removed the auto cleans for speed so we have to do it once manually
|
||||
emake clean
|
||||
fi
|
||||
# If we wanted firmware we built it in USE=firmware
|
||||
sed -i 's#bootrom/% armsrc/% recovery/%##' Makefile || die
|
||||
emake ${EMAKE_COMMON} all hitag2crack
|
||||
}
|
||||
|
||||
src_install(){
|
||||
export PREFIX=/usr
|
||||
export DESTDIR="${ED}"
|
||||
# hitag2crack needs it's own DESTDIR variable?
|
||||
export MYDESTDIR="${ED}"
|
||||
export UDEV_PREFIX="$(get_udevdir)/rules.d"
|
||||
export INSTALLDOCSRELPATH="/share/doc/${PF}"
|
||||
emake INSTALLDOCSRELPATH="/share/doc/${PF}" install hitag2crack/install
|
||||
if use firmware; then
|
||||
insinto /usr/share/${PN}
|
||||
doins -r "${S}"/firmware
|
||||
ln -s ./PM3BOOTROM.elf "${ED}/usr/share/${PN}/firmware/bootrom.elf"
|
||||
ln -s ./PM3GENERIC_256.elf "${ED}/usr/share/${PN}/firmware/proxmark3_recovery.bin"
|
||||
ln -s ./PM3GENERIC.elf "${ED}/usr/share/${PN}/firmware/fullimage.elf"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Because of building all firmware the some files end up in a different location with a different name
|
||||
sed -i -e 's#bootrom/obj/bootrom.elf#firmware/PM3BOOTROM.elf#' \
|
||||
-e 's#recovery/proxmark3_recovery.bin#firmware/PM3GENERIC_256.elf#' \
|
||||
-e 's#armsrc/obj/fullimage.elf#firmware/PM3GENERIC.elf#' tools/pm3_tests.sh || die
|
||||
# This isn't installed and was removed by "make clean" after firmware build
|
||||
sed -i '/if ! CheckFileExist "fpgacompress exists"/d' tools/pm3_tests.sh || die
|
||||
if use firmware; then
|
||||
./tools/pm3_tests.sh --long || die
|
||||
else
|
||||
./tools/pm3_tests.sh --long client || die
|
||||
fi
|
||||
# Opencl stuff doesn't work as the portage user
|
||||
#if use opencl; then
|
||||
# ./tools/pm3_tests.sh --long --opencl hitag2crack || die
|
||||
#else
|
||||
./tools/pm3_tests.sh --long hitag2crack || die
|
||||
#fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
udev_reload
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
udev_reload
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
|
@ -16,7 +16,7 @@ else
|
|||
#S=${WORKDIR}/${PN}-${HASH_COMMIT}
|
||||
|
||||
#or release
|
||||
KEYWORDS="amd64"
|
||||
KEYWORDS="~amd64"
|
||||
SRC_URI="https://github.com/RfidResearchGroup/proxmark3/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
fi
|
||||
DESCRIPTION="A general purpose RFID tool for Proxmark3 hardware"
|
||||
|
|
@ -24,25 +24,9 @@ HOMEPAGE="https://github.com/RfidResearchGroup/proxmark3"
|
|||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
# https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode
|
||||
STANDALONE="standalone-lf-em4100emul standalone-lf-em4100rswb standalone-lf-em4100rwc standalone-lf-hidbrute standalone-lf-hidfcbrute standalone-lf-icehid standalone-lf-nexid standalone-lf-proxbrute standalone-lf-samyrun standalone-lf-tharexde standalone-hf-14asniff standalone-hf-15sniff standalone-hf-aveful standalone-hf-bog standalone-hf-cardhopper standalone-hf-colin standalone-hf-craftbyte standalone-hf-iceclass standalone-hf-legic standalone-hf-legicsim standalone-hf-mattyrun standalone-hf-mfcsim standalone-hf-msdsal standalone-hf-reblay standalone-hf-tcprst standalone-hf-tmudford standalone-hf-unisniff standalone-hf-young standalone-dankarmulti"
|
||||
IUSE="+bluez deprecated +firmware +pm3rdv4 +qt ${STANDALONE}"
|
||||
REQUIRED_USE="?? ( ${STANDALONE/+/} )
|
||||
standalone-lf-hidfcbrute? ( pm3rdv4 )
|
||||
standalone-lf-icehid? ( pm3rdv4 )
|
||||
standalone-lf-nexid? ( pm3rdv4 )
|
||||
standalone-lf-tharexde? ( pm3rdv4 )
|
||||
standalone-hf-14asniff? ( pm3rdv4 )
|
||||
standalone-hf-15sniff? ( pm3rdv4 )
|
||||
standalone-hf-bog? ( pm3rdv4 )
|
||||
standalone-hf-cardhopper? ( pm3rdv4 )
|
||||
standalone-hf-colin? ( pm3rdv4 )
|
||||
standalone-hf-iceclass? ( pm3rdv4 )
|
||||
standalone-hf-legicsim? ( pm3rdv4 )
|
||||
standalone-hf-mfcsim? ( pm3rdv4 )
|
||||
"
|
||||
IUSE="+bluez +firmware opencl +qt"
|
||||
|
||||
DEPEND="
|
||||
CDEPEND="
|
||||
app-arch/bzip2
|
||||
app-arch/lz4:=
|
||||
dev-libs/jansson:=
|
||||
|
|
@ -50,88 +34,130 @@ DEPEND="
|
|||
sys-libs/readline:=
|
||||
media-libs/gd:2=
|
||||
bluez? ( net-wireless/bluez:= )
|
||||
opencl? ( dev-libs/opencl-icd-loader )
|
||||
qt? ( dev-qt/qtcore:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtgui:5 )
|
||||
"
|
||||
#this is basically just used for termcap
|
||||
RDEPEND="${DEPEND}
|
||||
sys-libs/ncurses:*[tinfo]
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-util/opencl-headers
|
||||
"
|
||||
RDEPEND="${CDEPEND}
|
||||
dev-python/ansicolors
|
||||
dev-python/sslcrypto
|
||||
"
|
||||
#ncurses is basically just used for termcap
|
||||
PDEPEND="sys-libs/ncurses:*[tinfo]"
|
||||
BDEPEND="firmware? ( sys-devel/gcc-arm-none-eabi:0 )"
|
||||
|
||||
QA_FLAGS_IGNORED="usr/share/proxmark3/firmware/bootrom.elf
|
||||
usr/share/proxmark3/firmware/fullimage.elf"
|
||||
usr/share/proxmark3/firmware/fullimage.elf
|
||||
usr/share/proxmark3/firmware/PM3BOOTROM.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_256.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFSKELETON.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100EMUL.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100RSWB.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100RSWW.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFEM4100RWC.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFHIDBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFMULTIHID.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFNEDAP_SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFPROXBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFPROX2BRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_LFSAMYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF14ASNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF14BSNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF15SNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HF15SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFAVEFUL.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFCRAFTBYTE.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFLEGIC.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFMATTYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFMSDSAL.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFTCPRST.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFTMUDFORD.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFUNISNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_HFYOUNG.elf
|
||||
usr/share/proxmark3/firmware/PM3GENERIC_DANKARMULTI.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFSKELETON.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100EMUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100RSWB.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100RSWW.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFEM4100RWC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFHIDBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFHIDFCBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFICEHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFMULTIHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFNEDAP_SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFNEXID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFPROXBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFPROX2BRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFSAMYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_LFTHAREXDE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF14ASNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF14BSNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF15SNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HF15SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFAVEFUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFBOG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFCOLIN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFCRAFTBYTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFICECLASS.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFLEGIC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFLEGICSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFMATTYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFMFCSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFMSDSAL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFTCPRST.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFTMUDFORD.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFUNISNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_HFYOUNG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_DANKARMULTI.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFSKELETON.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100EMUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100RSWB.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100RSWW.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFEM4100RWC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFHIDBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFHIDFCBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFICEHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFMULTIHID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFNEDAP_SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFNEXID.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFPROXBRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFPROX2BRUTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFSAMYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_LFTHAREXDE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF14ASNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF14BSNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF15SNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HF15SIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFAVEFUL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFBOG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFCARDHOPPER.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFCOLIN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFCRAFTBYTE.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFICECLASS.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFLEGIC.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFLEGICSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFMATTYRUN.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFMFCSIM.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFMSDSAL.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFREBLAY.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFTCPRST.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFTMUDFORD.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFUNISNIFF.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_HFYOUNG.elf
|
||||
usr/share/proxmark3/firmware/PM3RDV4_BTADDON_DANKARMULTI.elf
|
||||
"
|
||||
|
||||
src_prepare(){
|
||||
default
|
||||
#first we set platform
|
||||
if use pm3rdv4; then
|
||||
echo 'PLATFORM=PM3RDV4' > Makefile.platform
|
||||
echo 'PLATFORM_EXTRAS=BTADDON' >> Makefile.platform
|
||||
else
|
||||
echo 'PLATFORM=PM3GENERIC' > Makefile.platform
|
||||
fi
|
||||
#then we set a standalone mode
|
||||
if use standalone-lf-em4100emul; then
|
||||
echo 'STANDALONE=LF_EM4100EMUL' >> Makefile.platform
|
||||
elif use standalone-lf-em4100rswb; then
|
||||
echo 'STANDALONE=LF_EM4100RSWB' >> Makefile.platform
|
||||
elif use standalone-lf-em4100rwc; then
|
||||
echo 'STANDALONE=LF_EM4100RWC' >> Makefile.platform
|
||||
elif use standalone-lf-hidbrute; then
|
||||
echo 'STANDALONE=LF_HIDBRUTE' >> Makefile.platform
|
||||
elif use standalone-lf-hidfcbrute; then
|
||||
echo 'STANDALONE=LF_HIDFCBRUTE' >> Makefile.platform
|
||||
elif use standalone-lf-icehid; then
|
||||
echo 'STANDALONE=LF_ICEHID' >> Makefile.platform
|
||||
elif use standalone-lf-nexid; then
|
||||
echo 'STANDALONE=LF_NEXID' >> Makefile.platform
|
||||
elif use standalone-lf-proxbrute; then
|
||||
echo 'STANDALONE=LF_PROXBRUTE' >> Makefile.platform
|
||||
elif use standalone-lf-samyrun; then
|
||||
echo 'STANDALONE=LF_SAMYRUN' >> Makefile.platform
|
||||
elif use standalone-lf-tharexde; then
|
||||
echo 'STANDALONE=LF_THAREXDE' >> Makefile.platform
|
||||
elif use standalone-hf-14asniff; then
|
||||
echo 'STANDALONE=HF_14ASNIFF' >> Makefile.platform
|
||||
elif use standalone-hf-15sniff; then
|
||||
echo 'STANDALONE=HF_15SNIFF' >> Makefile.platform
|
||||
elif use standalone-hf-aveful; then
|
||||
echo 'STANDALONE=HF_AVEFUL' >> Makefile.platform
|
||||
elif use standalone-hf-bog; then
|
||||
echo 'STANDALONE=HF_BOG' >> Makefile.platform
|
||||
elif use standalone-hf-cardhopper; then
|
||||
echo 'STANDALONE=HF_CARDHOPPER' >> Makefile.platform
|
||||
elif use standalone-hf-colin; then
|
||||
echo 'STANDALONE=HF_COLIN' >> Makefile.platform
|
||||
elif use standalone-hf-craftbyte; then
|
||||
echo 'STANDALONE=HF_CRAFTBYTE' >> Makefile.platform
|
||||
elif use standalone-hf-iceclass; then
|
||||
echo 'STANDALONE=HF_ICECLASS' >> Makefile.platform
|
||||
elif use standalone-hf-legic; then
|
||||
echo 'STANDALONE=HF_LEGIC' >> Makefile.platform
|
||||
elif use standalone-hf-legicsim; then
|
||||
echo 'STANDALONE=HF_LEGICSIM' >> Makefile.platform
|
||||
elif use standalone-hf-mattyrun; then
|
||||
echo 'STANDALONE=HF_MATTYRUN' >> Makefile.platform
|
||||
elif use standalone-hf-msdsal; then
|
||||
echo 'STANDALONE=HF_MSDSAL' >> Makefile.platform
|
||||
elif use standalone-hf-reblay; then
|
||||
echo 'STANDALONE=HF_REBLAY' >> Makefile.platform
|
||||
elif use standalone-hf-tcprst; then
|
||||
echo 'STANDALONE=HF_TCPRST' >> Makefile.platform
|
||||
elif use standalone-hf-tmudford; then
|
||||
echo 'STANDALONE=HF_TMUDFORD' >> Makefile.platform
|
||||
elif use standalone-hf-unisniff; then
|
||||
echo 'STANDALONE=HF_UNISNIFF' >> Makefile.platform
|
||||
elif use standalone-hf-young; then
|
||||
echo 'STANDALONE=HF_YOUNG' >> Makefile.platform
|
||||
elif use standalone-dankarmulti; then
|
||||
echo 'STANDALONE=DANKARMULTI' >> Makefile.platform
|
||||
else
|
||||
echo 'STANDALONE=' >> Makefile.platform
|
||||
fi
|
||||
build_time=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
sed -i "s#\"\$ctime\",#\"${build_time}\",#" tools/mkversion.sh || die
|
||||
}
|
||||
|
||||
src_compile(){
|
||||
|
|
@ -141,53 +167,63 @@ src_compile(){
|
|||
#common flags
|
||||
EMAKE_COMMON=CC="$(tc-getCC)" DEFCFLAGS="${CFLAGS}" MYCFLAGS="${CFLAGS}"
|
||||
EMAKE_COMMON+= MYCXXFLAGS="${CXXFLAGS}" MYLDFLAGS="${LDFLAGS}"
|
||||
use qt || export SKIPQT=1
|
||||
use bluez || export SKIPBT=1
|
||||
use qt || export SKIPQT=1
|
||||
use opencl || export SKIPOPENCL=1
|
||||
if use firmware; then
|
||||
emake ${EMAKE_COMMON} client
|
||||
emake ${EMAKE_COMMON} all
|
||||
elif use deprecated; then
|
||||
emake ${EMAKE_COMMON} client
|
||||
emake ${EMAKE_COMMON} mfkey nonce2key
|
||||
else
|
||||
emake ${EMAKE_COMMON} client
|
||||
#prevent repeat cleaning of things which were never built
|
||||
sed -i '/\$(Q)\$(MAKE) \-\-no-print-directory \-C recovery clean/d' Makefile || die
|
||||
sed -i '/\$(Q)\$(MAKE) \-\-no-print-directory \-C client clean/d' Makefile || die
|
||||
#prevent rebuilding fpga_compress for every firmware
|
||||
sed -i '/\$(Q)\$(MAKE) \-\-no-print-directory \-C tools\/fpga_compress clean/d' Makefile || die
|
||||
DEST="firmware" MKFLAGS="${MAKEOPTS} ${EMAKE_COMMON}" ./tools/build_all_firmwares.sh || die
|
||||
# We removed the auto cleans for speed so we have to do it once manually
|
||||
emake clean
|
||||
fi
|
||||
# If we wanted firmware we built it in USE=firmware
|
||||
sed -i 's#bootrom/% armsrc/% recovery/%##' Makefile || die
|
||||
emake ${EMAKE_COMMON} all hitag2crack
|
||||
}
|
||||
|
||||
src_install(){
|
||||
export PREFIX=/usr
|
||||
export DESTDIR="${ED}"
|
||||
# hitag2crack needs it's own DESTDIR variable?
|
||||
export MYDESTDIR="${ED}"
|
||||
export UDEV_PREFIX="$(get_udevdir)/rules.d"
|
||||
export INSTALLDOCSRELPATH="/share/doc/${PF}"
|
||||
emake INSTALLDOCSRELPATH="/share/doc/${PF}" install hitag2crack/install
|
||||
if use firmware; then
|
||||
emake INSTALLDOCSRELPATH="/share/doc/${PF}" install
|
||||
elif use deprecated; then
|
||||
emake INSTALLDOCSRELPATH="/share/doc/${PF}" client/install mfkey/install nonce2key/install common/install
|
||||
else
|
||||
emake INSTALLDOCSRELPATH="/share/doc/${PF}" client/install common/install
|
||||
insinto /usr/share/${PN}
|
||||
doins -r "${S}"/firmware
|
||||
ln -s ./PM3BOOTROM.elf "${ED}/usr/share/${PN}/firmware/bootrom.elf"
|
||||
ln -s ./PM3GENERIC_256.elf "${ED}/usr/share/${PN}/firmware/proxmark3_recovery.bin"
|
||||
ln -s ./PM3GENERIC.elf "${ED}/usr/share/${PN}/firmware/fullimage.elf"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Because of building all firmware the some files end up in a different location with a different name
|
||||
sed -i -e 's#bootrom/obj/bootrom.elf#firmware/PM3BOOTROM.elf#' \
|
||||
-e 's#recovery/proxmark3_recovery.bin#firmware/PM3GENERIC_256.elf#' \
|
||||
-e 's#armsrc/obj/fullimage.elf#firmware/PM3GENERIC.elf#' tools/pm3_tests.sh || die
|
||||
# This isn't installed and was removed by "make clean" after firmware build
|
||||
sed -i '/if ! CheckFileExist "fpgacompress exists"/d' tools/pm3_tests.sh || die
|
||||
if use firmware; then
|
||||
./pm3test.sh
|
||||
./tools/pm3_tests.sh --long || die
|
||||
else
|
||||
./pm3test.sh client
|
||||
./tools/pm3_tests.sh --long client || die
|
||||
fi
|
||||
# Opencl stuff doesn't work as the portage user
|
||||
#if use opencl; then
|
||||
# ./tools/pm3_tests.sh --long --opencl hitag2crack || die
|
||||
#else
|
||||
./tools/pm3_tests.sh --long hitag2crack || die
|
||||
#fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
udev_reload
|
||||
if use firmware; then
|
||||
if use pm3rdv4; then
|
||||
ewarn "Please note, all firmware and recovery files are intended for the Proxmark3 RDV4"
|
||||
ewarn "including support for the optional blueshark accessory."
|
||||
ewarn "If this is not what you intended please unset the pm3rdv4 use flag for generic firmware"
|
||||
else
|
||||
ewarn "Please note, all firmware and recovery files are built for a generic target."
|
||||
ewarn "If you have a Proxmark3 RDV4 you should set the pm3rdv4 use flag for an improved firmware"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue