Added automatic version updater script

This commit is contained in:
Krizsán Péter 2024-10-06 23:00:45 +02:00
parent 24e11d3380
commit a29d61da37
10 changed files with 104 additions and 120 deletions

View File

@ -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 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtorrent-rasterbar.xml"/>' ../blfs_root/blfs-xml/networking/netlibs/netlibs.xml
grep -qF libtorrent-rasterbar-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY libtorrent-rasterbar-version "2.0.10">' >> ../blfs_root/blfs-xml/packages.ent
grep -qF libtorrent-rasterbar-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY libtorrent-rasterbar-version "2.0.10-a3cdc51">' >> ../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 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qbittorrent.xml"/>' ../blfs_root/blfs-xml/xsoft/other/other.xml
grep -qF qbittorrent-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY qbittorrent-version "4.6.4">' >> ../blfs_root/blfs-xml/packages.ent
grep -qF qbittorrent-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY qbittorrent-version "5.0.0">' >> ../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 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkcs11-helper.xml"/>' ../blfs_root/blfs-xml/postlfs/security/security.xml
grep -qF pkcs11-helper-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY pkcs11-helper-version "1.30.0">' >> ../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 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="freerdp.xml"/>' ../blfs_root/blfs-xml/xsoft/other/other.xml
grep -qF freerdp-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY freerdp-version "3.4.0">' >> ../blfs_root/blfs-xml/packages.ent
grep -qF pkcs11-helper-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY pkcs11-helper-version "1.30.0-d86851b">' >> ../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 '<!ENTITY m
# Add QMPlay2
cp -fv multimedia/videoutils/qmplay2.xml ../blfs_root/blfs-xml/multimedia/videoutils
grep -qF qmplay2.xml ../blfs_root/blfs-xml/multimedia/videoutils/videoutils.xml || sed -i '/<\/chapter>.*/i <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qmplay2.xml"/>' ../blfs_root/blfs-xml/multimedia/videoutils/videoutils.xml
grep -qF qmplay2-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY qmplay2-version "24.04.07">' >> ../blfs_root/blfs-xml/packages.ent
grep -qF qmplay2-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY qmplay2-version "24.06.16-f61024b">' >> ../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 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sdl2-ttf.xml"/>' ../blfs_root/blfs-xml/general/graphlib/graphlib.xml
grep -qF sdl2-ttf-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY sdl2-ttf-version "2.22.0">' >> ../blfs_root/blfs-xml/packages.ent
grep -qF sdl2-ttf-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY sdl2-ttf-version "2.22.0-c37ced3">' >> ../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 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sdl2-image.xml"/>' ../blfs_root/blfs-xml/general/graphlib/graphlib.xml
grep -qF sdl2-image-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY sdl2-image-version "2.8.2">' >> ../blfs_root/blfs-xml/packages.ent
grep -qF sdl2-image-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY sdl2-image-version "2.8.2-6f45843">' >> ../blfs_root/blfs-xml/packages.ent

View File

@ -4,7 +4,7 @@
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY sdl2-image-download-http "https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-2.8.2.tar.gz">
<!ENTITY sdl2-image-download-http "https://github.com/libsdl-org/SDL_image/archive/refs/heads/main.zip -O SDL2-image-2.8.2-6f45843.zip">
<!ENTITY sdl2-image-download-ftp " ">
<!ENTITY sdl2-image-md5sum " ">
<!ENTITY sdl2-image-size "12.6 MB">

View File

@ -4,7 +4,7 @@
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY sdl2-ttf-download-http "https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-2.22.0.tar.gz">
<!ENTITY sdl2-ttf-download-http "https://github.com/libsdl-org/SDL_ttf/archive/refs/heads/main.zip -O SDL2-ttf-2.22.0-c37ced3.zip">
<!ENTITY sdl2-ttf-download-ftp " ">
<!ENTITY sdl2-ttf-md5sum " ">
<!ENTITY sdl2-ttf-size "12.6 MB">

View File

@ -4,7 +4,7 @@
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY qmplay2-download-http "https://github.com/zaps166/QMPlay2/releases/download/24.04.07/QMPlay2-src-24.04.07.tar.xz">
<!ENTITY qmplay2-download-http "https://github.com/zaps166/QMPlay2/archive/refs/heads/master.zip -O QMPlay2-24.06.16-f61024b.zip">
<!ENTITY qmplay2-download-ftp " ">
<!ENTITY qmplay2-md5sum " ">
<!ENTITY qmplay2-size "1.6 MB">
@ -67,7 +67,7 @@
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="qt5"/>, and
<xref linkend="qt6"/>, and
<xref linkend="ffmpeg"/>, and
<xref linkend="taglib"/>, and
<xref linkend="libass"/>, and
@ -84,9 +84,12 @@
<screen><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
cmake .. -DCMAKE_INSTALL_PREFIX=/usr &amp;&amp;
make</userinput></screen>
cmake -GNinja -B . -S .. -DCMAKE_INSTALL_PREFIX=/usr &amp;&amp;
ninja -C .</userinput></screen>
<screen role="root"><userinput>make install/strip</userinput></screen>
<screen role="root"><userinput>ninja -C . install/strip &amp;&amp;
update-desktop-database &amp;&amp;
update-mime-database /usr/share/mime &amp;&amp;
gtk-update-icon-cache /usr/share/icons/hicolor</userinput></screen>
</sect2>
</sect1>

View File

@ -4,7 +4,7 @@
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY libtorrent-rasterbar-download-http "https://github.com/arvidn/libtorrent/releases/download/v2.0.10/libtorrent-rasterbar-2.0.10.tar.gz">
<!ENTITY libtorrent-rasterbar-download-http "https://github.com/arvidn/libtorrent/archive/refs/heads/RC_2_0.zip -O libtorrent-rasterbar-2.0.10-a3cdc51.zip">
<!ENTITY libtorrent-rasterbar-download-ftp " ">
<!ENTITY libtorrent-rasterbar-md5sum " ">
<!ENTITY libtorrent-rasterbar-size "4.2 MB">

View File

@ -4,7 +4,7 @@
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY pkcs11-helper-download-http "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-1.30.0/pkcs11-helper-1.30.0.tar.bz2">
<!ENTITY pkcs11-helper-download-http "https://github.com/OpenSC/pkcs11-helper/archive/refs/heads/master.zip -O pkcs11-helper-1.30.0-d86851b.zip">
<!ENTITY pkcs11-helper-download-ftp " ">
<!ENTITY pkcs11-helper-md5sum " ">
<!ENTITY pkcs11-helper-size "12.6 MB">

83
update_package_versions.sh Executable file
View File

@ -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

View File

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY freerdp-download-http "https://github.com/FreeRDP/FreeRDP/releases/download/3.4.0/freerdp-3.4.0.tar.gz">
<!ENTITY freerdp-download-ftp " ">
<!ENTITY freerdp-md5sum "">
<!ENTITY freerdp-size "4.6 MB">
<!ENTITY freerdp-buildsize "500 MB">
<!ENTITY freerdp-time "2 SBU (using parallelism=4)">
]>
<sect1 id="freerdp" xreflabel="FreeRDP-&freerdp-version;">
<?dbhtml filename="freerdp.html"?>
<title>FreeRDP-&freerdp-version;</title>
<indexterm zone="freerdp">
<primary sortas="a-FreeRDP">FreeRDP</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to FreeRDP</title>
<para>
<application>FreeRDP</application> 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.
</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&freerdp-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&freerdp-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &freerdp-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &freerdp-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &freerdp-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &freerdp-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">FreeRDP Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="pkcs11-helper"/>, and
<xref linkend="libusb"/>, and
<xref linkend="ffmpeg"/>, and
<xref linkend="faad2"/>, and
<xref linkend="faac"/>, and
<xref linkend="cairo"/>, and
<xref linkend="alsa"/>, and
<xref linkend="alsa-lib"/>, and
<xref linkend="pulseaudio"/>, and
<xref linkend="cups"/>, and
<xref linkend="icu"/>, and
<xref linkend="sdl2"/>, and
<xref linkend="sdl2-ttf"/>, and
<xref linkend="sdl2-image"/>
</para>
</sect2>
<sect2 role="installation">
<title/>
<screen><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
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.. &amp;&amp;
cmake --build .</userinput></screen>
<screen role="root"><userinput>cmake --build . --target install</userinput></screen>
</sect2>
</sect1>

View File

@ -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>