Skip to content

Commit 39e7a95

Browse files
committed
Improve enhanced licensing support
Also contains some whitespace fixes.
1 parent f3cd719 commit 39e7a95

File tree

10 files changed

+55
-5
lines changed

10 files changed

+55
-5
lines changed

elements/components/libdatachannel.bst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ variables:
1818
-DNO_EXAMPLES=ON
1919
-DNO_TESTS=ON
2020
21+
public:
22+
bst:
23+
split-rules:
24+
# Put the examples licenses as extra
25+
extra:
26+
- "%{project_licensedir}/libdatachannel/examples"
27+
- "%{project_licensedir}/libdatachannel/examples/**"
28+
2129
sources:
2230
- kind: git_repo
2331
url: github:paullouisageneau/libdatachannel.git

elements/components/libvpl.bst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ depends:
77
- freedesktop-sdk.bst:public-stacks/runtime-minimal.bst
88

99
variables:
10+
license-files-extra: third-party-programs.txt
11+
1012
cmake-local: >-
1113
-DBUILD_SHARED_LIBS=ON
1214
-DENABLE_LIBDIR_IN_RUNTIME_SEARCH=ON
1315
-DINSTALL_DEV=ON
1416
-DBUILD_EXPERIMENTAL=OFF
1517
-DBUILD_EXAMPLES=OFF
1618
19+
config:
20+
install-commands:
21+
(>):
22+
# Delete duplicate license files
23+
- rm -rf "%{install-root}%{datadir}/vpl/licensing"
24+
1725
public:
1826
bst:
1927
split-rules:
@@ -23,6 +31,8 @@ public:
2331
- "%{sysconfdir}/**"
2432
- "%{datadir}/vpl/examples"
2533
- "%{datadir}/vpl/examples/**"
34+
- "%{project_licensedir}/libvpl/examples"
35+
- "%{project_licensedir}/libvpl/examples/**"
2636
runtime:
2737
(>):
2838
- "%{datadir}"

elements/components/nlohmann-json.bst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ build-depends:
66
variables:
77
cmake-local: -DJSON_BuildTests=OFF
88

9+
config:
10+
install-commands:
11+
(>):
12+
# Delete documentation about licensing picked by install-extra
13+
- rm -rf "%{install-root}%{project_licensedir}/nlohmann-json/docs"
14+
915
sources:
1016
- kind: git_repo
1117
url: github:nlohmann/json.git

elements/components/qt/base.bst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ depends:
3737
- freedesktop-sdk.bst:components/zstd.bst
3838

3939
variables:
40+
qt-element-name: base
41+
4042
qt-opts: >-
4143
-DBUILD_SHARED_LIBS=ON
4244
-DWARNINGS_ARE_ERRORS=OFF
@@ -260,6 +262,6 @@ variables:
260262
261263
sources:
262264
- kind: tar
263-
url:
265+
url:
264266
qt_archive:%{qt-api-version}/%{qt-version}/submodules/qtbase-everywhere-src-%{qt-version}.tar.xz
265267
ref: 012043ce6d411e6e8a91fdc4e05e6bedcfa10fcb1347d3c33908f7fdd10dfe05

elements/components/qt/imageformats.bst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ depends:
1313
- components/qt/base.bst
1414

1515
variables:
16+
qt-element-name: imageformats
17+
1618
cmake-local: >-
1719
-DFEATURE_jasper=OFF
1820
-DFEATURE_mng=OFF
@@ -23,6 +25,6 @@ variables:
2325
2426
sources:
2527
- kind: tar
26-
url:
28+
url:
2729
qt_archive:%{qt-api-version}/%{qt-version}/submodules/qtimageformats-everywhere-src-%{qt-version}.tar.xz
2830
ref: d2a1bbb84707b8a0aec29227b170be00f04383fbf2361943596d09e7e443c8e1

elements/components/qt/svg.bst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ depends:
77
(>):
88
- components/qt/base.bst
99

10+
variables:
11+
qt-element-name: svg
12+
1013
sources:
1114
- kind: tar
12-
url:
15+
url:
1316
qt_archive:%{qt-api-version}/%{qt-version}/submodules/qtsvg-everywhere-src-%{qt-version}.tar.xz
1417
ref: aa2579f21ca66d19cbcf31d87e9067e07932635d36869c8239d4decd0a9dc1fa

elements/components/qt/wayland.bst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ depends:
1313
- components/qt/base.bst
1414

1515
variables:
16+
qt-element-name: wayland
17+
1618
cmake-local: >-
1719
-DFEATURE_wayland_client=ON
1820
-DFEATURE_wayland_server=OFF

elements/components/rnnoise.bst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ depends:
77
- freedesktop-sdk.bst:public-stacks/runtime-minimal.bst
88

99
variables:
10+
license-files-extra: >-
11+
README
12+
AUTHORS
13+
1014
conf-local: >-
1115
--disable-doc
1216
--disable-examples
1317
1418
config:
1519
install-commands:
1620
(>):
17-
# Delete the installed README
21+
# Delete duplicate license files
1822
- |
19-
rm -f '%{install-root}%{datadir}/doc/rnnoise/README'
23+
set -euo pipefail # Force bash
24+
rm -f "%{install-root}%{datadir}/doc/rnnoise/"{README,AUTHORS,COPYING}
25+
rmdir --ignore-fail-on-non-empty "%{install-root}%{datadir}/doc"{/rnnoise,}
2026
2127
public:
2228
bst:

elements/include/qt.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ depends:
55
- freedesktop-sdk.bst:public-stacks/runtime-minimal.bst
66

77
variables:
8+
qt-element-name: unknown
89
qt-api-version: "6.8"
910
qt-version: "6.8.2"
1011

12+
license-element-name: "qt-%{qt-element-name}"
13+
# NOTE: This is similar to what KDE does for their runtime
14+
license-files-final: "LICENSES/*.txt"
15+
1116
qt-bindir: "%{bindir}"
1217
qt-includedir: "%{includedir}/qt"
1318
qt-libdir: "%{libdir}"

project.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ variables:
3636
localstatedir: "%{appdir}/var"
3737
lib: "lib"
3838

39+
# Remove %{project-name} subfolder for licenses
40+
project_licensedir: "%{licensedir}"
41+
3942
# Modify Freedesktop SDK stripping options to be closer to Flatpak behavior
4043
optimize-debug: "false" # No dwz optimization
4144

@@ -47,6 +50,9 @@ variables:
4750
rmdir %{install-root}%{debugdir}%{appdir}
4851
fi
4952

53+
license-files-extra: >-
54+
LICENSES/*.txt
55+
5056
environment:
5157
LC_ALL: en_US.UTF-8
5258
# Set Flatpak application and runtime paths

0 commit comments

Comments
 (0)