Kaydet (Commit) 86ee8908 authored tarafından sulincix's avatar sulincix

artık ataraxialinux derleme talimatı ile inary üretilebiliyor (deneysel)

üst a643c436
......@@ -111,6 +111,6 @@ def proceed(force=False):
"create-cracklib-dict /usr/share/cracklib/*")
sys.stdout.write("\n")
if ctx.config.values.general.fs_sync:
ctx.ui.info(_("[-] Syncing filesystem to restrain filesystem corruptions.", noln=True)
ctx.ui.info(_("[-] Syncing filesystem to restrain filesystem corruptions."), noln=True)
os.sync()
ctx.ui.info(_("[+] Synced filesystem.", noln=True)
ctx.ui.info(_("[+] Synced filesystem."), noln=True)
#!/bin/bash
ataraxia-meson(){
exec meson setup \
--prefix /usr \
--libexecdir lib \
--sbindir bin \
--buildtype plain \
--auto-features enabled \
--wrap-mode nodownload \
-D b_lto=true \
-D b_pie=true \
"$@"
}
[ -d build ] && rm -rf build
[ -d install ] && rm -rf install
[ -d inary ] && rm -rf inary
export SRC=$(pwd)/build
export PKG=$(pwd)/install
export CC=gcc
export CXX=g++
mkdir -p $SRC
mkdir inary
source KagamiBuild
cd $SRC
for s in $source
do
if basename $s | grep ".git$" &>/dev/null ; then
git clone $s
else
wget $s
tar -xf $(basename $s)
fi
done
build
cd $PKG
[ -f ../install.tar.xz ] && rm -f ../install.tar.xz
tar --xz -cf ../install.tar.xz *
echo -e "<Files>" > ../files.xml
find | sed "s|^\./||g" | while read line
do
if [ -f $line ] ; then
echo -e " <File>" >> ../files.xml
echo -e " <Path>$line</Path>" >> ../files.xml
echo -e " <Type>data</Type>" >> ../files.xml
echo -e " <Size>$(du -b $line | awk '{print $1}')</Size>" >> ../files.xml
echo -e " <Uid>0</Uid>" >> ../files.xml
echo -e " <Gid>0</Gid>" >> ../files.xml
echo -e " <Mode>0o755</Mode>" >> ../files.xml
echo -e " <Hash>$(sha1sum $line | awk '{print $1}')</Hash>" >> ../files.xml
echo -e " </File>" >> ../files.xml
fi
done
echo -e "</Files>" >> ../files.xml
cd ..
mv install.tar.xz inary/install.tar.xz
mv files.xml inary/files.xml
export url="$(cat KagamiBuild | grep '# URL:'| head -n 1 | awk '{print $3}')"
export pkgdesc="$(cat KagamiBuild | grep '# Description:'| head -n 1 | sed 's/^# Description://g')"
export depends=($(cat KagamiBuild | grep '# Depends on:'| head -n 1 | sed "s/^# Depends on://g"))
export license="unknown"
export installtarhash="$(sha1sum inary/install.tar.xz | awk '{print $1}')"
{
echo -e "<INARY>"
echo -e " <Source>"
echo -e " <Name>$name</Name>"
echo -e " <Homepage>$url</Homepage>"
echo -e " <Packager>"
echo -e " <Name>Auto generated</Name>"
echo -e " <Email>auto@generat.et</Email>"
echo -e " </Packager>"
echo -e " </Source>"
echo -e " <Package>"
echo -e " <RFP></RFP>"
echo -e " <PartOf>ataraxia</PartOf>"
echo -e " <Name>$name</Name>"
echo -e " <Summary xml:lang=\"en\">$pkgdesc</Summary>"
echo -e " <Description xml:lang=\"en\">$pkgdesc</Description>"
echo -e " <IsA>app</IsA>"
echo -e " <License>$license</License>"
echo -e " <RuntimeDependencies>"
for dep in ${depends[@]}
do
echo -e " <Dependency>$dep</Dependency>"
done
echo -e " </RuntimeDependencies>"
echo -e " <Files>"
echo -e " <Path fileType=\"data\">/usr</Path>"
echo -e " <Path fileType=\"data\">/etc</Path>"
echo -e " <Path fileType=\"data\">/bin</Path>"
echo -e " <Path fileType=\"data\">/var</Path>"
echo -e " <Path fileType=\"data\">/lib</Path>"
echo -e " <Path fileType=\"data\">/boot</Path>"
echo -e " </Files>"
echo -e " <History>"
echo -e " <Update release=\"1\">"
echo -e " <Date>2020-04-24</Date>"
echo -e " <Version>$version</Version>"
echo -e " <Comment>Auto generated.</Comment>"
echo -e " <Name>Auto generated</Name>"
echo -e " <Email>auto@generat.et</Email>"
echo -e " </Update>"
echo -e " </History>"
echo -e " <BuildHost>uludag</BuildHost>"
echo -e " <Distribution>Sulin</Distribution>"
echo -e " <DistributionRelease>2019</DistributionRelease>"
echo -e " <Architecture>x86_64</Architecture>"
echo -e " <InstalledSize>1</InstalledSize>"
echo -e " <InstallTarHash>$installtarhash</InstallTarHash>"
echo -e " <PackageFormat>1.2</PackageFormat>"
echo -e " </Package>"
echo -e "</INARY>"
} > inary/metadata.xml
cd inary
zip -r ../$name-$version-$(uname -m).inary ./*
File mode changed from 100644 to 100755
......@@ -207,6 +207,7 @@ setup(name="inary",
'scripts/revdep-rebuild',
'scripts/sulinstrapt',
'scripts/makepkg',
'scripts/makekagami',
'scripts/mkdeb',
'scripts/revdep-rebuild-devel',
'scripts/inary-sandbox',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment