Add license

This commit is contained in:
2025-05-10 15:48:53 +03:00
parent eba00d5f3a
commit 02f1afcf74
3 changed files with 29 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
# Webpage URL
URL="https://www.kernel.org/pub/software/network/ethtool/"
# Cell to extract
ROW=2
COLUMN=1
# Get HTML table from webpage
HTML_TABLE=$(curl -s -L "$URL" | sed -n -e '/<table>/,/<\/table>/ p' | sed -e 's/^[ \t]*//')
# Get row from $HTML_TABLE
ROW_START=$(echo "$HTML_TABLE" | grep -n -m$ROW '<tr>' | tail -n1 | cut -d':' -f1)
ROW_END=$(echo "$HTML_TABLE" | grep -n -m$ROW '</tr>' | tail -n1 | cut -d':' -f1)
HTML_ROW=$(echo "$HTML_TABLE" | sed "$ROW_START,$ROW_END !d")
# Get column from $HTML_ROW
HTML_COLUMN=$(echo "$HTML_ROW" | grep -m$COLUMN '^<td>' | tail -n1)
# Get version by removing HTML tags from $HTML_COLUMN
VERSION=$(echo "$HTML_COLUMN" | sed 's|<[^>]*>||g')
echo "$VERSION"
+2 -1
View File
@@ -1,8 +1,9 @@
name: ethtool
description: Utility for controlling network drivers and hardware
version: 6.10
revision: 2
url: https://www.kernel.org/pub/software/network/ethtool/
license: GPL
license: GPL2-only
architecture: any
depends: ["glibc","libmnl"]
type: source
+3
View File
@@ -29,4 +29,7 @@ check() {
# This function is used to move the compiled files into the output directory
package() {
make DESTDIR="$BPM_OUTPUT" install
# Install package licenses
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/ethtool/COPYING
}