Add license
This commit is contained in:
@@ -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"
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
name: ethtool
|
name: ethtool
|
||||||
description: Utility for controlling network drivers and hardware
|
description: Utility for controlling network drivers and hardware
|
||||||
version: 6.10
|
version: 6.10
|
||||||
|
revision: 2
|
||||||
url: https://www.kernel.org/pub/software/network/ethtool/
|
url: https://www.kernel.org/pub/software/network/ethtool/
|
||||||
license: GPL
|
license: GPL2-only
|
||||||
architecture: any
|
architecture: any
|
||||||
depends: ["glibc","libmnl"]
|
depends: ["glibc","libmnl"]
|
||||||
type: source
|
type: source
|
||||||
|
|||||||
@@ -29,4 +29,7 @@ check() {
|
|||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
make DESTDIR="$BPM_OUTPUT" install
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
|
# Install package licenses
|
||||||
|
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/ethtool/COPYING
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user