From df32132df49c55e24c536bb482fec438a41d55cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 19 Sep 2021 20:36:59 +0700 Subject: [PATCH] crda: proper cleanup --- srcpkgs/crda/patches/python3.patch | 4 ++-- srcpkgs/crda/template | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/srcpkgs/crda/patches/python3.patch b/srcpkgs/crda/patches/python3.patch index 3e1c51ce59c..bfa3ec1777a 100644 --- a/srcpkgs/crda/patches/python3.patch +++ b/srcpkgs/crda/patches/python3.patch @@ -1,6 +1,6 @@ https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/crda/trunk/crda-4.14-python-3.patch ---- a/utils/key2pub.py -+++ b/utils/key2pub.py +--- a/crda/utils/key2pub.py ++++ b/crda/utils/key2pub.py @@ -1,22 +1,22 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 diff --git a/srcpkgs/crda/template b/srcpkgs/crda/template index 4c5183f23c6..b5a683e8502 100644 --- a/srcpkgs/crda/template +++ b/srcpkgs/crda/template @@ -4,7 +4,8 @@ version=4.14 revision=2 _dbname=wireless-regdb _dbversion=2020.11.20 -_dbsrc="${XBPS_BUILDDIR}/${_dbname}-${_dbversion}/" +create_wrksrc=yes +build_wrksrc="crda" hostmakedepends="openssl python3-M2Crypto pkg-config" makedepends="libnl-devel libgcrypt-devel" depends="iw" @@ -21,7 +22,9 @@ conf_files="/etc/wireless-regdom.conf" build_options="wardrive" desc_option_wardrive="Disable CRDA checks for wardriving competitions" +_dbsrc="../${_dbname}-${_dbversion}/" post_extract() { + mv crda-$version crda if [ "$build_option_wardrive" ]; then sed -i 's/([0-9][0-9])/(33)/g' ${_dbsrc}/db.txt # Max 2W =~ 33dBm fi @@ -29,10 +32,8 @@ post_extract() { do_build() { CFLAGS+=" -Wno-unused-const-variable" - cd ${_dbsrc} - cp *.pub.pem ${wrksrc}/pubkeys + cp ${_dbsrc}/*.pub.pem pubkeys - cd ${wrksrc} make CC="$CC" all_noverify }