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

scripts fixes

üst 3f98f0f8
#!/usr/bin/python3
#fonksionlar
tab=0
def write(tag,name="",vars=[]):
ret="{}<{}".format(("\t"*tab),tag)
for i in vars:
ret=ret+" "+i
ret=ret+">{}</{}>".format(name,tag)
return ret
def otag(tag):
global tab
ret="{}<{}>".format(("\t"*tab),tag)
tab=tab+1
return ret
def ctag(tag):
global tab
tab=tab-1
return "{}</{}>".format(("\t"*tab),tag)
from pspec import inary
# pspec başı
print('<?xml version="1.0" ?>')
print('<!DOCTYPE INARY SYSTEM "https://raw.githubusercontent.com/Zaryob/inary/master/inary-spec.dtd">')
print(otag("Inary"))
# Source kısmı başı
print()
print(otag("Source"))
print(write("Name",inary.source.name))
print(write("Homepage",inary.source.homepage))
print(otag("Packager"))
print(write("Name",inary.source.packager.name))
print(write("Email",inary.source.packager.email))
print(ctag("Packager"))
print(write("License",inary.source.license))
# IsA kısmı zorunlu değil o yüzden önce varmı bakıyoz
if hasattr(inary.source,"isa"):
for i in inary.source.isa:
print(write("IsA",i))
#partof aynı şekilde zorunlu değil
if hasattr(inary.source,"partof"):
print(write("partof",inary.source.partof))
#Summary Description zorunlu
print(write("Summary",inary.source.summary))
print(write("Description",inary.source.description))
#Archives zorunlu
for i in inary.source.archive:
print(write("Archive",i[1],["sha1sum=\"{}\"".format(i[0])]))
#AdditionalFiles zorunlu değil.
if hasattr(inary.source,"additionalfiles"):
print(otag("AdditionalFile"))
for i in inary.source.additionalfiles:
print(write("AdditionalFile",i[1],["target=\"{}\"".format(i[0])]))
print(ctag("AdditionalFile"))
#BuildDependencies zorunlu (boş bile olsa)
print(otag("BuildDependencies"))
for i in inary.source.builddependencies:
print(write("Dependency",i))
print(ctag("BuildDependencies"))
#Patches zorunlu değil
if hasattr(inary.source,"patches"):
print(otag("Patches"))
for i in inary.source.patches:
print(write("Patch",i))
print(ctag("Patches"))
#Source bitişi
print(ctag("Source"))
#Package başı
for package in inary.source.packages:
pkg=getattr(inary, package)
print()
print(otag("Package"))
print(write("Name",pkg.name))
#RuntimeDependencies zorunlu (boş bile olsa)
print(otag("RuntimeDependencies"))
for i in pkg.runtimedependencies:
print(write("Dependency",i))
print(ctag("RuntimeDependencies"))
#Files zorunlu
print(otag("Files"))
for i in pkg.files:
print(write("Path",i[1],["fileType=\"{}\"".format(i[0])]))
print(ctag("Files"))
#AdditionalFiles zorunlu değil
if hasattr(pkg,"additionalfiles"):
print(otag("AdditionalFile"))
for i in pkg.additionalfiles:
print(write("AdditionalFile",i[0],["owner=\"{}\"".format(i[1]),"permission=\"{}\"".format(str(i[2])),"target=\"{}\"".format(i[3])]))
print(ctag("AdditionalFile"))
#Package sonu
print(ctag("Package"))
#History başı
print()
print(otag("History"))
j=len(inary.history.update)
for i in inary.history.update:
print(otag("Update release=\"{}\"".format(j)))
print(write("Date",i[0]))
print(write("Version",i[1]))
print(write("Comment",i[2]))
print(write("Name",i[3]))
print(write("Email",i[4]))
print(ctag("Update"))
j=j-1
print(ctag("History"))
print(ctag("Inary"))
......@@ -4,7 +4,7 @@ pwd=$(pwd)
echo "Checking"
if [ -f inary_files/metadata.xml ] && [ -d install ] ; then
cd install
echo "Creating install.tar.gz"
echo "Creating install.tar.xz"
tar --xz -cf ../inary_files/install.tar.xz ./*
echo "Creating files.xml"
echo -e "<Files>" > ../inary_files/files.xml
......
......@@ -227,9 +227,11 @@ setup(name="inary",
'scripts/inary-sandbox',
'scripts/inarysh',
'scripts/lsinary',
'scripts/mkinary',
'scripts/detect-dep',
'scripts/detect-file-dep',
'scripts/uninary',
'scripts/genpspec',
'scripts/update-inary-cache',
'scripts/version-bump'] if getConfig("ADDITIONAL_SCRIPTS") else ['inary-cli']),
classifiers=[
......
class inary:
class source:
name="ciksemel"
homepage="http://github.com/SulinOS/"
class packager:
name="Süleyman Poyraz"
email="zaryob.dev@gmail.com"
license="GPLv2"
isa=["app:console"]
partof="bystem.base"
summary="ciksemel is iksemel based xml library."
description="Application deployment framework for desktop apps"
archive=[("6daf8319453645dd8bae2d85e22f7a6ae08a2d1c","https://gitlab.com/sulinos/devel/ciksemel/-/archive/ciklemel-1.1/ciksemel-ciklemel-1.1.tar.gz")]
builddependencies=["python3-devel"]
additionalfiles=[
("config",".config"),
("test",".test")
]
patches=["fix-1.patch"]
packages=["package","package_devel"]
class package:
name="ciksemel"
runtimedependencies=["python3"]
files=[("library","/usr/lib/sulin/ciksemel*")]
additionalfiles=[
("config","root","0755",".config")
]
class package_devel:
name="ciksemel-devel"
runtimedependencies=["python3"]
files=[("library","/usr/lib/sulin/ciksemel*")]
additionalfiles=[
("config","root","0755",".config")
]
class history:
update=[
["2020-06-21","1.1","Python 3.8 rebuild","Suleyman Poyraz","zaryob.dev@gmail.com"],
["2019-09-17","1.1","Package is rebuilded and released up.","Suleyman Poyraz","zaryob.dev@gmail.com"],
["2019-09-17","1","Package is rebuilded and released up.","Suleyman Poyraz","zaryob.dev@gmail.com"],
["2019-09-17","1","First release","Suleyman Poyraz","zaryob.dev@gmail.com"]
]
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