Added vscode and md5sum calculation

This commit is contained in:
Krizsán Péter 2024-11-01 01:38:40 +01:00
parent fe1e0379d1
commit 2e1338f472
10 changed files with 151 additions and 8 deletions

View File

@ -39,3 +39,8 @@ grep -qF sdl2-ttf-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY s
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
# Add VSCode
cp -fv xsoft/other/vscode.xml ../blfs_root/blfs-xml/xsoft/other
grep -qF vscode.xml ../blfs_root/blfs-xml/xsoft/other/other.xml || sed -i '/<\/chapter>.*/i <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vscode.xml"/>' ../blfs_root/blfs-xml/xsoft/other/other.xml
grep -qF vscode-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY vscode-version "1.95.1">' >> ../blfs_root/blfs-xml/packages.ent

View File

@ -6,7 +6,7 @@
<!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-ftp " ">
<!ENTITY sdl2-image-md5sum " ">
<!ENTITY sdl2-image-md5sum "8464c8aaad39fe9be6a9c1e85b370cd1">
<!ENTITY sdl2-image-size "12.6 MB">
<!ENTITY sdl2-image-buildsize "150 MB">
<!ENTITY sdl2-image-time "1 SBU (using parallelism=4)">

View File

@ -6,7 +6,7 @@
<!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-ftp " ">
<!ENTITY sdl2-ttf-md5sum " ">
<!ENTITY sdl2-ttf-md5sum "686e685caaa215d8fa1ac7bb02b2cf54">
<!ENTITY sdl2-ttf-size "12.6 MB">
<!ENTITY sdl2-ttf-buildsize "150 MB">
<!ENTITY sdl2-ttf-time "1 SBU (using parallelism=4)">

View File

@ -6,7 +6,7 @@
<!ENTITY qmplay2-download-http "https://github.com/zaps166/QMPlay2/releases/download/24.06.16/QMPlay2-src-24.06.16.tar.xz">
<!ENTITY qmplay2-download-ftp " ">
<!ENTITY qmplay2-md5sum " ">
<!ENTITY qmplay2-md5sum "6089f03f70cb63bf9c66f5768df192c3">
<!ENTITY qmplay2-size "1.6 MB">
<!ENTITY qmplay2-buildsize "160 MB">
<!ENTITY qmplay2-time "2 SBU (using parallelism=4)">

View File

@ -6,7 +6,7 @@
<!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-ftp " ">
<!ENTITY libtorrent-rasterbar-md5sum " ">
<!ENTITY libtorrent-rasterbar-md5sum "bfe6fff84add3dc5d51e10547f85e217">
<!ENTITY libtorrent-rasterbar-size "4.2 MB">
<!ENTITY libtorrent-rasterbar-buildsize "150 MB">
<!ENTITY libtorrent-rasterbar-time "1.5 SBU (using parallelism=4)">

View File

@ -6,7 +6,7 @@
<!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-ftp " ">
<!ENTITY pkcs11-helper-md5sum " ">
<!ENTITY pkcs11-helper-md5sum "f6dacff56228a6e9d5c0d417464a0d31">
<!ENTITY pkcs11-helper-size "12.6 MB">
<!ENTITY pkcs11-helper-buildsize "150 MB">
<!ENTITY pkcs11-helper-time "1 SBU (using parallelism=4)">

View File

@ -6,7 +6,7 @@
<!ENTITY minidlna-download-http "https://sourceforge.net/projects/minidlna/files/minidlna/1.3.3/minidlna-1.3.3.tar.gz">
<!ENTITY minidlna-download-ftp " ">
<!ENTITY minidlna-md5sum " ">
<!ENTITY minidlna-md5sum "a8b010d8803811f4e26e57894c30fa6c">
<!ENTITY minidlna-size "2.4 MB">
<!ENTITY minidlna-buildsize "50 MB">
<!ENTITY minidlna-time "0.5 SBU (using parallelism=4)">

View File

@ -12,9 +12,12 @@ greetMsg()
# Does the actual update of the package with the found version.
updatePkg()
{
MD5=$(curl -sL "$3" | md5sum | cut -d' ' -f1)
sed -i -E "s@($1-version \"+)(.+\">)@\1$2\">@" add_packages.sh
sed -i -E "s@($1-download-http \"+)(.+\">)@\1$3\">@" ./"$4"/"$1".xml
sed -i -E "s@($1-md5sum *\"+)(.+\">)@\1$MD5\">@" ./"$4"/"$1".xml
echo "Latest version: $2"
echo "MD5 sum: $MD5"
printf "Found package: %s\n" "$3"
}
@ -29,6 +32,17 @@ getLatestGithubRelease()
if [[ $4 ]]; then
VER=$(echo "$VER" | cut -c"$4")
fi
updatePkg "$2" "$VER" "$URL" "$3" "$MD5"
}
# Function that gets the latest release of a specific package.
# This function works only with packages stored on github.
# It generates a codeload tar.gz download link
getLatestCodeloadRelease()
{
greetMsg "$2"
VER=$(curl -v --silent "https://github.com/$1/releases" 2>&1 | grep 'loading="lazy" src=' | tr '"' '\n' | grep /releases/ -m1 | rev | cut -d/ -f1 | rev)
URL="https://codeload.github.com/$1/tar.gz/refs/tags/$VER"
updatePkg "$2" "$VER" "$URL" "$3"
}
@ -70,4 +84,6 @@ getLatestGithubRelease libsdl-org/SDL_image sdl2-image general/graphlib
#SDL2-ttf
getLatestGithubRelease libsdl-org/SDL_ttf sdl2-ttf general/graphlib
#vscode
getLatestCodeloadRelease microsoft/vscode vscode xsoft/other

View File

@ -6,7 +6,7 @@
<!ENTITY qbittorrent-download-http "https://sourceforge.net/projects/qbittorrent/files/qbittorrent/qbittorrent-5.0.1/qbittorrent-5.0.1.tar.gz">
<!ENTITY qbittorrent-download-ftp " ">
<!ENTITY qbittorrent-md5sum " ">
<!ENTITY qbittorrent-md5sum "c7d7893c774e9156d50c0952cfdcbe14">
<!ENTITY qbittorrent-size "4.6 MB">
<!ENTITY qbittorrent-buildsize "500 MB">
<!ENTITY qbittorrent-time "2 SBU (using parallelism=4)">

122
xsoft/other/vscode.xml Normal file
View File

@ -0,0 +1,122 @@
<?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 vscode-download-http "https://codeload.github.com/microsoft/vscode/tar.gz/refs/tags/1.95.1">
<!ENTITY vscode-download-ftp " ">
<!ENTITY vscode-md5sum "4db63724a16f2c4b9dc2fe7b6a38d6c7">
<!ENTITY vscode-size "4.6 MB">
<!ENTITY vscode-buildsize "500 MB">
<!ENTITY vscode-time "2 SBU (using parallelism=4)">
]>
<sect1 id="vscode" xreflabel="VSCode-&vscode-version;">
<?dbhtml filename="vscode.html"?>
<title>VSCode-&vscode-version;</title>
<indexterm zone="vscode">
<primary sortas="a-VSCode">VSCode</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to VSCode</title>
<para>
<application>VSCode</application> is a nice IDE for different programming languages.
</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&vscode-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&vscode-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &vscode-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &vscode-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &vscode-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &vscode-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">VSCode Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="mitkrb"/>, and
<xref linkend="libsecret"/>, and
<xref linkend="python3"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of VSCode</title>
<para>
Install <application>VSCode</application> by running the
following commands:
</para>
<screen><userinput>sed "/git config /s/^/\/\//" build/npm/postinstall.js &amp;&amp;
npm install &amp;&amp;
npm run watch</userinput></screen>
<para>
This package does not come with a test suite.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>cmake --install build</userinput></screen>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directory</segtitle>
<seglistitem>
<seg>
vscode
</seg>
<seg>
None
</seg>
<seg>
/usr/share/vscode
</seg>
</seglistitem>
</segmentedlist>
</sect2>
</sect1>