From a29d61da3762e2ebdc1ab25842ee58703b9bb847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krizs=C3=A1n=20P=C3=A9ter?= Date: Sun, 6 Oct 2024 23:00:45 +0200 Subject: [PATCH] Added automatic version updater script --- add_packages.sh | 17 ++-- general/graphlib/sdl2-image.xml | 2 +- general/graphlib/sdl2-ttf.xml | 2 +- multimedia/videoutils/qmplay2.xml | 13 +-- networking/netlibs/libtorrent-rasterbar.xml | 2 +- postlfs/security/pkcs11-helper.xml | 2 +- rmscripts.sh | 2 +- update_package_versions.sh | 83 ++++++++++++++++++ xsoft/other/freerdp.xml | 97 --------------------- xsoft/other/qbittorrent.xml | 4 +- 10 files changed, 104 insertions(+), 120 deletions(-) create mode 100755 update_package_versions.sh delete mode 100644 xsoft/other/freerdp.xml diff --git a/add_packages.sh b/add_packages.sh index 1fcab2b..9ffae7c 100755 --- a/add_packages.sh +++ b/add_packages.sh @@ -3,22 +3,17 @@ # Add libtorrent-rasterbar cp -fv networking/netlibs/libtorrent-rasterbar.xml ../blfs_root/blfs-xml/networking/netlibs grep -qF libtorrent-rasterbar.xml ../blfs_root/blfs-xml/networking/netlibs/netlibs.xml || sed -i '/<\/chapter>.*/i ' ../blfs_root/blfs-xml/networking/netlibs/netlibs.xml -grep -qF libtorrent-rasterbar-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent +grep -qF libtorrent-rasterbar-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent # Add qBittorrent cp -fv xsoft/other/qbittorrent.xml ../blfs_root/blfs-xml/xsoft/other grep -qF qbittorrent.xml ../blfs_root/blfs-xml/xsoft/other/other.xml || sed -i '/<\/chapter>.*/i ' ../blfs_root/blfs-xml/xsoft/other/other.xml -grep -qF qbittorrent-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent +grep -qF qbittorrent-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent # Add pkcs11-helper cp -fv postlfs/security/pkcs11-helper.xml ../blfs_root/blfs-xml/postlfs/security grep -qF pkcs11-helper.xml ../blfs_root/blfs-xml/postlfs/security/security.xml || sed -i '/<\/chapter>.*/i ' ../blfs_root/blfs-xml/postlfs/security/security.xml -grep -qF pkcs11-helper-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent - -# Add FreeRDP -cp -fv xsoft/other/freerdp.xml ../blfs_root/blfs-xml/xsoft/other -grep -qF freerdp.xml ../blfs_root/blfs-xml/xsoft/other/other.xml || sed -i '/<\/chapter>.*/i ' ../blfs_root/blfs-xml/xsoft/other/other.xml -grep -qF freerdp-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent +grep -qF pkcs11-helper-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent # Add libid3tag cp -fv multimedia/libdriv/libid3tag.xml ../blfs_root/blfs-xml/multimedia/libdriv @@ -33,14 +28,14 @@ grep -qF minidlna-version ../blfs_root/blfs-xml/packages.ent || echo '.*/i ' ../blfs_root/blfs-xml/multimedia/videoutils/videoutils.xml -grep -qF qmplay2-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent +grep -qF qmplay2-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent # Add SDL2_ttf cp -fv general/graphlib/sdl2-ttf.xml ../blfs_root/blfs-xml/general/graphlib grep -qF sdl2-ttf.xml ../blfs_root/blfs-xml/general/graphlib/graphlib.xml || sed -i '/<\/chapter>.*/i ' ../blfs_root/blfs-xml/general/graphlib/graphlib.xml -grep -qF sdl2-ttf-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent +grep -qF sdl2-ttf-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent # Add SDL2_image cp -fv general/graphlib/sdl2-image.xml ../blfs_root/blfs-xml/general/graphlib grep -qF sdl2-image.xml ../blfs_root/blfs-xml/general/graphlib/graphlib.xml || sed -i '/<\/chapter>.*/i ' ../blfs_root/blfs-xml/general/graphlib/graphlib.xml -grep -qF sdl2-image-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent +grep -qF sdl2-image-version ../blfs_root/blfs-xml/packages.ent || echo '' >> ../blfs_root/blfs-xml/packages.ent diff --git a/general/graphlib/sdl2-image.xml b/general/graphlib/sdl2-image.xml index eca8191..29110d0 100644 --- a/general/graphlib/sdl2-image.xml +++ b/general/graphlib/sdl2-image.xml @@ -4,7 +4,7 @@ %general-entities; - + diff --git a/general/graphlib/sdl2-ttf.xml b/general/graphlib/sdl2-ttf.xml index a6e6930..10ee94c 100644 --- a/general/graphlib/sdl2-ttf.xml +++ b/general/graphlib/sdl2-ttf.xml @@ -4,7 +4,7 @@ %general-entities; - + diff --git a/multimedia/videoutils/qmplay2.xml b/multimedia/videoutils/qmplay2.xml index bb7d35b..3a00186 100644 --- a/multimedia/videoutils/qmplay2.xml +++ b/multimedia/videoutils/qmplay2.xml @@ -4,7 +4,7 @@ %general-entities; - + @@ -67,7 +67,7 @@ Required - , and + , and , and , and , and @@ -84,9 +84,12 @@ mkdir build && cd build && -cmake .. -DCMAKE_INSTALL_PREFIX=/usr && -make +cmake -GNinja -B . -S .. -DCMAKE_INSTALL_PREFIX=/usr && +ninja -C . -make install/strip +ninja -C . install/strip && +update-desktop-database && +update-mime-database /usr/share/mime && +gtk-update-icon-cache /usr/share/icons/hicolor diff --git a/networking/netlibs/libtorrent-rasterbar.xml b/networking/netlibs/libtorrent-rasterbar.xml index 6a7b11b..b5cb225 100644 --- a/networking/netlibs/libtorrent-rasterbar.xml +++ b/networking/netlibs/libtorrent-rasterbar.xml @@ -4,7 +4,7 @@ %general-entities; - + diff --git a/postlfs/security/pkcs11-helper.xml b/postlfs/security/pkcs11-helper.xml index dc799fb..d51d373 100644 --- a/postlfs/security/pkcs11-helper.xml +++ b/postlfs/security/pkcs11-helper.xml @@ -4,7 +4,7 @@ %general-entities; - + diff --git a/rmscripts.sh b/rmscripts.sh index cc4d182..6467195 100755 --- a/rmscripts.sh +++ b/rmscripts.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/bash # first parameter is the blfs tool's script folder # second parameter is the blfs tool's installed packages xml file diff --git a/update_package_versions.sh b/update_package_versions.sh new file mode 100755 index 0000000..9238cd2 --- /dev/null +++ b/update_package_versions.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# This script checks and updates the latest versions of the packages + +#minidlna +DOWNLOAD_URL=`curl -v --silent https://sourceforge.net/projects/minidlna/files/minidlna/ 2>&1 | grep net.sf.files | tr '"' '\n' | grep http -m1` +DOWNLOAD_URL="${DOWNLOAD_URL%/download}" +LATEST_VERSION=`echo $DOWNLOAD_URL | awk -F/ '{ print $NF }'` +sed -i -E "s@(minidlna-version \"+)(.+\">)@\1$LATEST_VERSION\">@" add_packages.sh +DOWNLOAD_URL=$DOWNLOAD_URL/minidlna-$LATEST_VERSION.tar.gz +sed -i -E "s@(minidlna-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./server/other/minidlna.xml + +#libid3tag +DOWNLOAD_URL=`curl -v --silent https://sourceforge.net/projects/mad/files/libid3tag/ 2>&1 | grep net.sf.files | tr '"' '\n' | grep http -m1` +DOWNLOAD_URL="${DOWNLOAD_URL%/download}" +LATEST_VERSION=`echo $DOWNLOAD_URL | awk -F/ '{ print $NF }'` +sed -i -E "s@(libid3tag-version \"+)(.+\">)@\1$LATEST_VERSION\">@" add_packages.sh +DOWNLOAD_URL=$DOWNLOAD_URL/libid3tag-$LATEST_VERSION.tar.gz +sed -i -E "s@(libid3tag-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./multimedia/libdriv/libid3tag.xml + +#pkcs11-helper +#DOWNLOAD_URL=`curl -v --silent https://github.com/OpenSC/pkcs11-helper/releases 2>&1 | grep src= | tr '"' '\n' | grep pkcs11-helper- | head -1` +#DOWNLOAD_URL="https://github.com`curl -v --silent $DOWNLOAD_URL 2>&1 | tr '"' '\n' | grep .tar.bz2 -m 1`" +#sed -i -E "s@(pkcs11-helper-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./postlfs/security/pkcs11-helper.xml +#LATEST_VERSION=`echo $DOWNLOAD_URL | tr '-' '\n' | tr '/' '\n' | grep '.tar.bz2'` +#LATEST_VERSION="${LATEST_VERSION%.tar.bz2}" +#sed -i -E "s@(pkcs11-helper-version \"+)(.+\">)@\1$LATEST_VERSION\">@" add_packages.sh + +#pkcs11-helper +URL="https://github.com/OpenSC/pkcs11-helper/" +LAST_COMMIT=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep 'spoofed_commit_check' | awk -F/ '{ print $NF }' | cut -c1-7` +LAST_RELEASE=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep '/releases/tag' | awk -F\/ '{ print $NF }' | cut -c 15-` +LATEST_VERSION="$LAST_RELEASE-$LAST_COMMIT" +sed -i -E "s/(pkcs11-helper-version \"+)(.+\">)/\1$LATEST_VERSION\">/" add_packages.sh +DOWNLOAD_URL="https://github.com/OpenSC/pkcs11-helper/archive/refs/heads/master.zip -O pkcs11-helper-$LATEST_VERSION.zip" +sed -i -E "s@(pkcs11-helper-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./postlfs/security/pkcs11-helper.xml + +#QMPlay2 +URL="https://github.com/zaps166/QMPlay2/" +LAST_COMMIT=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep 'spoofed_commit_check' | awk -F/ '{ print $NF }' | cut -c1-7` +LAST_RELEASE=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep '/releases/tag' | awk -F\/ '{ print $NF }'` +LATEST_VERSION="$LAST_RELEASE-$LAST_COMMIT" +sed -i -E "s/(qmplay2-version \"+)(.+\">)/\1$LATEST_VERSION\">/" add_packages.sh +DOWNLOAD_URL="https://github.com/zaps166/QMPlay2/archive/refs/heads/master.zip -O QMPlay2-$LATEST_VERSION.zip" +sed -i -E "s@(qmplay2-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./multimedia/videoutils/qmplay2.xml + +#qBittorrent +URL="https://www.qbittorrent.org/download" +DOWNLOAD_URL=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep '.tar.xz/'` +DOWNLOAD_URL="${DOWNLOAD_URL%/download}" +sed -i -E "s@(qbittorrent-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./xsoft/other/qbittorrent.xml +LATEST_VERSION=`echo $DOWNLOAD_URL | tr '-' '\n' | tr '/' '\n' | grep '.tar.xz'` +LATEST_VERSION="${LATEST_VERSION%.tar.xz}" +sed -i -E "s@(qbittorrent-version \"+)(.+\">)@\1$LATEST_VERSION\">@" add_packages.sh + +#libtorrent-rasterbar +URL="https://github.com/arvidn/libtorrent/" +LAST_COMMIT=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep 'spoofed_commit_check' | awk -F/ '{ print $NF }' | cut -c1-7` +LAST_RELEASE=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep '/releases/tag' | awk -F\/ '{ print $NF }' | cut -c 2-` +LATEST_VERSION="$LAST_RELEASE-$LAST_COMMIT" +sed -i -E "s/(libtorrent-rasterbar-version \"+)(.+\">)/\1$LATEST_VERSION\">/" add_packages.sh +DOWNLOAD_URL="https://github.com/arvidn/libtorrent/archive/refs/heads/RC_2_0.zip -O libtorrent-rasterbar-$LATEST_VERSION.zip" +sed -i -E "s@(libtorrent-rasterbar-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./networking/netlibs/libtorrent-rasterbar.xml + +#SDL2-image +URL="https://github.com/libsdl-org/SDL_image/" +LAST_COMMIT=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep 'spoofed_commit_check' | awk -F/ '{ print $NF }' | cut -c1-7` +LAST_RELEASE=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep '/releases/tag' | awk -F\/ '{ print $NF }' | cut -c 9-` +LATEST_VERSION="$LAST_RELEASE-$LAST_COMMIT" +sed -i -E "s/(sdl2-image-version \"+)(.+\">)/\1$LATEST_VERSION\">/" add_packages.sh +DOWNLOAD_URL="https://github.com/libsdl-org/SDL_image/archive/refs/heads/main.zip -O SDL2-image-$LATEST_VERSION.zip" +sed -i -E "s@(sdl2-image-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./general/graphlib/sdl2-image.xml + +#SDL2-ttf +URL="https://github.com/libsdl-org/SDL_ttf/" +LAST_COMMIT=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep 'spoofed_commit_check' | awk -F/ '{ print $NF }' | cut -c1-7` +LAST_RELEASE=`curl -v --silent $URL 2>&1 | tr '"' '\n' | grep '/releases/tag' | awk -F\/ '{ print $NF }' | cut -c 9-` +LATEST_VERSION="$LAST_RELEASE-$LAST_COMMIT" +sed -i -E "s/(sdl2-ttf-version \"+)(.+\">)/\1$LATEST_VERSION\">/" add_packages.sh +DOWNLOAD_URL="https://github.com/libsdl-org/SDL_ttf/archive/refs/heads/main.zip -O SDL2-ttf-$LATEST_VERSION.zip" +sed -i -E "s@(sdl2-ttf-download-http \"+)(.+\">)@\1$DOWNLOAD_URL\">@" ./general/graphlib/sdl2-ttf.xml + +# Patch scripts.xsl to handle -O parameter in wget urls +sed -i "s/basename \$URL/basename \$URL | awk -F' ' '{ print \$NF}'/g" ../blfs_root/xsl/scripts.xsl diff --git a/xsoft/other/freerdp.xml b/xsoft/other/freerdp.xml deleted file mode 100644 index 83c8245..0000000 --- a/xsoft/other/freerdp.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - %general-entities; - - - - - - - -]> - - - - - - FreeRDP-&freerdp-version; - - - FreeRDP - - - - Introduction to FreeRDP - - - FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Enjoy the freedom of using your software wherever you want, the way you want it, in a world where interoperability can finally liberate your computing experience. - - - Package Information - - - - Download (HTTP): - - - - - Download (FTP): - - - - - Download MD5 sum: &freerdp-md5sum; - - - - - Download size: &freerdp-size; - - - - - Estimated disk space required: &freerdp-buildsize; - - - - - Estimated build time: &freerdp-time; - - - - - FreeRDP Dependencies - - Required - - , and - , and - , and - , and - , and - , and - , and - , and - , and - , and - , and - , and - , and - - - - - - - -<screen><userinput>mkdir build && -cd build && -cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON -DWITH_KRB5=OFF -DCHANNEL_URBDRC=ON -DWITH_FFMPEG=ON -DWITH_SWSCALE=ON -DWITH_DSP_FFMPEG=ON -DWITH_CUPS=ON -DWITH_PULSE=ON -DWITH_FAAC=ON -DWITH_FAAD2=ON -DWITH_GSM=OFF -DWITH_CAIRO=ON -DWITH_ICU=ON -DWITH_VAAPI=ON -DWITH_PLATFORM_SERVER=OFF -DWITH_WEBVIEW=OFF -DWITH_MANPAGES=OFF -B. -H.. && -cmake --build .</userinput></screen> - -<screen role="root"><userinput>cmake --build . --target install</userinput></screen> - </sect2> -</sect1> diff --git a/xsoft/other/qbittorrent.xml b/xsoft/other/qbittorrent.xml index cfd4308..b75cbf0 100644 --- a/xsoft/other/qbittorrent.xml +++ b/xsoft/other/qbittorrent.xml @@ -4,7 +4,7 @@ <!ENTITY % general-entities SYSTEM "../../general.ent"> %general-entities; - <!ENTITY qbittorrent-download-http "https://sourceforge.net/projects/qbittorrent/files/qbittorrent/qbittorrent-4.6.4/qbittorrent-4.6.4.tar.xz"> + <!ENTITY qbittorrent-download-http "https://sourceforge.net/projects/qbittorrent/files/qbittorrent/qbittorrent-5.0.0/qbittorrent-5.0.0.tar.xz"> <!ENTITY qbittorrent-download-ftp " "> <!ENTITY qbittorrent-md5sum " "> <!ENTITY qbittorrent-size "4.6 MB"> @@ -67,7 +67,7 @@ <bridgehead renderas="sect4">Required</bridgehead> <para role="required"> - <xref linkend="qt5"/>, and + <xref linkend="qt6"/>, and <xref linkend="libtorrent-rasterbar"/> </para> </sect2>