Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/autotools.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit: [cpackage, libtool, make, install, "basement::update-config"]
inherit: [cpackage, libtool, make, install, "basement::update-config", licenses]

buildVars: [AUTOTOOLS_AUTO_STATIC, AR, CC, CXX]
buildSetup: |
Expand Down
2 changes: 1 addition & 1 deletion classes/basement/bits/python3-pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit: [python3]
inherit: [python3, licenses]

buildSetup: |
# add current pip install directory to PYTHONPATH for instant
Expand Down
2 changes: 1 addition & 1 deletion classes/cargo.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit: [pkg-config, install]
inherit: [pkg-config, install, licenses]

depends:
# we need a host rustc compiler + a cross std lib for the target arch
Expand Down
2 changes: 1 addition & 1 deletion classes/cmake.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit: [cpackage, ninja, install]
inherit: [cpackage, ninja, install, licenses]

buildToolsWeak: [cmake]
buildVars: [AUTOCONF_HOST, AR, CC, CXX]
Expand Down
48 changes: 48 additions & 0 deletions classes/licenses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
buildScript: |
ln -snf $1 .bob-license-src

packageVars: [PKG_LICENSE, PKG_LICENSE_PATH, BASEMENT_ADD_LICENSE]
packageSetup: |
__LICENSES_SRC=$1/.bob-license-src
# check if the supplied ref is has a valid idString SPDX-Spec v2.3 Annex D.1
licensesCheckValidRef () {
if [[ $1 =~ ^[A-Za-z0-9.\-]+$ ]]; then
return 0
fi
echo "Invalid License idRef: $1" >&2
return 1
}

licensesPackage () {
if [ -z "${PKG_LICENSE:-}" ]; then
echo "PKG_LICENSE is missing!" >&2
return 1
fi
mkdir -p .bob
echo "${PKG_LICENSE}" > .bob/license

declare -A LICENSE_REFS
while IFS=: read -r id file ; do
if [[ -n $id && -n $file ]] ; then
licensesCheckValidRef "$id"
LICENSE_REFS["$id"]="$file"
fi
done <<< "${PKG_LICENSE_PATH:-}"

local L="$PKG_LICENSE"
while [[ $L =~ LicenseRef-([A-Za-z0-9.-]+)(.*) ]] ; do
ID="${BASH_REMATCH[1]}"
L="${BASH_REMATCH[2]}"
if licensesCheckValidRef $ID && [ ${LICENSE_REFS[$ID]+set} ]; then
mkdir -p .bob/licenses
cp $__LICENSES_SRC/${LICENSE_REFS[$ID]} .bob/licenses/$ID
fi
done

return 0
}

packageScript: |
if [ ${BASEMENT_ADD_LICENSE:-true} == true ]; then
licensesPackage
fi
2 changes: 1 addition & 1 deletion classes/meson.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit: [cpackage, install, python3]
inherit: [cpackage, install, python3, licenses]

buildToolsWeak: [meson, ninja]
buildVars: [CC, CXX, AR, STRIP, NM]
Expand Down
1 change: 1 addition & 0 deletions recipes/core/coreutils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools, patch]

metaEnvironment:
PKG_VERSION: "9.5"
PKG_LICENSE: "GFDL-1.3-or-later AND GPL-3.0-or-later"

depends:
- libs::gmp-dev
Expand Down
3 changes: 3 additions & 0 deletions recipes/core/util-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ inherit: [autotools]
metaEnvironment:
PKG_VERSION_MAJOR: "2.40"
PKG_VERSION: "2.40.2"
PKG_LICENSE: "LicenseRef-util-linux"
PKG_LICENSE_PATH:
util-linux:README.licensing

depends:
- libs::ncurses-dev
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/autoconf-2.69.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools-noarch, patch]

metaEnvironment:
PKG_VERSION: "2.69"
PKG_LICENSE: "GPL-2.0 AND GPL-3.0 WITH Autoconf-exception-3.0"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/autoconf-archive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools-noarch]

metaEnvironment:
PKG_VERSION: "2023.02.20"
PKG_LICENSE: "GPL-3.0-or-later WITH Autoconf-exception-3.0"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/autoconf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools-noarch, patch]

metaEnvironment:
PKG_VERSION: "2.72"
PKG_LICENSE: "GPL-2.0 AND GPL-3.0 WITH Autoconf-exception-3.0"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/automake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools-noarch, patch]

metaEnvironment:
PKG_VERSION: "1.16.5"
PKG_LICENSE: "GPL-2.0-only"

depends:
- devel::autoconf
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/binutils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools, patch]

metaEnvironment:
PKG_VERSION: "2.45"
PKG_LICENSE: "FSFAP AND GFDL-1.3 AND GPL-2.0-or-later AND LGPL-2.0-or-later"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/bison.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "3.8.2"
PKG_LICENSE: "GPL-3.0-or-later"

# parallel make sometimes fails in examples/c/reccalc/...
jobServer: False
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [patch]

metaEnvironment:
PKG_VERSION: "3.25.1"
PKG_LICENSE: "BSD-3-Clause"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/compat/binutils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "2.34"
PKG_LICENSE: "FSFAP AND GFDL-1.3 AND GPL-2.0-or-later AND LGPL-2.0-or-later"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/compat/gcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [make, install, patch]

metaEnvironment:
PKG_VERSION: "9.5.0"
PKG_LICENSE: "GPL-3.0-with-GCC-exception"

depends:
- environment:
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/diffutils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "3.10"
PKG_LICENSE: "GPL-3.0-or-later"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/dune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [cpackage, make]

metaEnvironment:
PKG_VERSION: "3.17.2"
PKG_LICENSE: "MIT"

depends:
- libs::zstd-dev
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/fakeroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "1.34"
PKG_LICENSE: "GPL-3.0-or-later"

depends:
- libs::libcap-dev
Expand Down
3 changes: 3 additions & 0 deletions recipes/devel/flex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ inherit: [autotools, autoconf, patch]

metaEnvironment:
PKG_VERSION: "2.6.4"
PKG_LICENSE: "LicenseRef-flex"
PKG_LICENSE_PATH: |
flex:COPYING

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/gcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autoconf, make, patch, install, "basement::update-config"]

metaEnvironment:
PKG_VERSION: "13.4.0"
PKG_LICENSE: "GPL-3.0-with-GCC-exception"

depends:
- libs::gmp-dev
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/gettext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "0.22.5"
PKG_LICENSE: "GFDL-1.2-only AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-only"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [cpackage, install, make, pkg-config]

metaEnvironment:
PKG_VERSION: "2.47.1"
PKG_LICENSE: "GPL-2.0-only"

depends:
- libs::zlib-dev
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/gperf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "3.1"
PKG_LICENSE: "GPL-3.0-or-later"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/help2man.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
inherit: [autotools]
metaEnvironment:
PKG_VERSION: "1.49.3"
PKG_LICENSE: "GPL-3.0"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/libtool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ inherit: [libtool, patch]

metaEnvironment:
PKG_VERSION: "2.4.6"
PKG_LICENSE: "LGPL-2.0-or-later WITH Libtool-exception"

privateEnvironment:
APPLY_LIBTOOL_PATCH: "no"
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/m4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools, patch]

metaEnvironment:
PKG_VERSION: "1.4.20"
PKG_LICENSE: "GPL-3.0-or-later"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/make.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [cpackage, libtool, install, "basement::update-config"]

metaEnvironment:
PKG_VERSION: "4.3"
PKG_LICENSE: "GPL-3.0-only"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/meson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: ["python3::setuptools"]

metaEnvironment:
PKG_VERSION: "1.5.1"
PKG_LICENSE: "Apache-2.0"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/ninja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [cpackage, install, patch]

metaEnvironment:
PKG_VERSION: "1.11.1.g95dee.kitware.jobserver-1"
PKG_LICENSE: "Apache-2.0"

checkoutSCM:
scm: url
Expand Down
3 changes: 3 additions & 0 deletions recipes/devel/ocaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "5.3.0"
PKG_LICENSE: "LicenseRef-ocaml"
PKG_LICENSE_PATH:
ocaml:LICENSE

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/ocamlfind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "1.9.8"
PKG_LICENSE: "MIT"

depends:
- libs::zstd-dev
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/opam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "2.3.0"
PKG_LICENSE: "LGPL-2.1-only"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "2.7.6"
PKG_LICENSE: "GPL-3.0-or-later"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/pkg-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
inherit: [libtool, patch]

metaEnvironment:
PKG_LICENSE: "GPL-2.0"
PKG_VERSION: "0.29.2"

checkoutSCM:
Expand Down
1 change: 1 addition & 0 deletions recipes/devel/texinfo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
inherit: [autotools]

metaEnvironment:
PKG_LICENSE: "GPL-3.0"
PKG_VERSION: "6.1"

checkoutSCM:
Expand Down
1 change: 1 addition & 0 deletions recipes/editors/ed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "1.20.2"
PKG_LICENSE: "GPL-2.0-only"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/kernel/linux-libc-headers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ inherit: [make]

metaEnvironment:
PKG_VERSION: "6.6.31"
PKG_LICENSE: "GPL-2.0-only"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/libs/bigarray-compat.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
inherit: [ocaml, install]

metaEnvironment:
PKG_LICENSE: "ISC"
PKG_VERSION: "1.1.0"

checkoutSCM:
Expand Down
1 change: 1 addition & 0 deletions recipes/libs/compat/glibc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ depends:
use: [tools]

metaEnvironment:
PKG_LICENSE: "GPL-2.0-or-later AND LGPL-2.1-or-later"
PKG_VERSION: "2.31"

checkoutSCM:
Expand Down
1 change: 1 addition & 0 deletions recipes/libs/compat/isl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools]

metaEnvironment:
PKG_VERSION: "0.22.1"
PKG_LICENSE: "MIT"

privateEnvironment:
APPLY_LIBTOOL_PATCH: "no"
Expand Down
1 change: 1 addition & 0 deletions recipes/libs/csexp.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
inherit: [install]

metaEnvironment:
PKG_LICENSE: "MIT"
PKG_VERSION: "1.5.2"

checkoutSCM:
Expand Down
1 change: 1 addition & 0 deletions recipes/libs/expat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools, autoconf]

metaEnvironment:
PKG_VERSION: "2.4.1"
PKG_LICENSE: "MIT"

checkoutSCM:
scm: url
Expand Down
1 change: 1 addition & 0 deletions recipes/libs/gdbm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ inherit: [autotools, autoconf]

metaEnvironment:
PKG_VERSION: "1.23"
PKG_LICENSE: "GPL-3.0-or-later"

checkoutSCM:
scm: url
Expand Down
Loading