Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski committed Oct 11, 2024
1 parent 3fc331d commit 0f19c2e
Show file tree
Hide file tree
Showing 46 changed files with 3,975 additions and 13,538 deletions.
20 changes: 9 additions & 11 deletions pkgbuild/archlinux/python2/basename.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,22 @@
$FileInfo: basename.py - Last Update: 2/15/2016 Ver. 0.0.5 RC 3 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
unicode_literals)

import argparse
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
import argparse

__version_info__ = (0, 0, 5, "rc3")
if (__version_info__[3] is not None):
__version__ = str(__version_info__[0]) + "." + str(__version_info__[1]) + "." + str(
__version_info__[2]) + "+" + str(__version_info__[3])
if (__version_info__[3] is None):
__version__ = str(__version_info__[
0]) + "." + str(__version_info__[1]) + "." + str(__version_info__[2])
if(__version_info__[3] != None):
__version__ = str(__version_info__[0])+"."+str(__version_info__[1])+"."+str(
__version_info__[2])+"+"+str(__version_info__[3])
if(__version_info__[3] == None):
__version__ = str(
__version_info__[0])+"."+str(__version_info__[1])+"."+str(__version_info__[2])

proname = "basename"
prover = __version__
profullname = proname + " " + prover
profullname = proname+" "+prover

parser = argparse.ArgumentParser(conflict_handler="resolve", add_help=True)
parser.add_argument("-v", "--version", action="version", version=profullname)
Expand Down
20 changes: 9 additions & 11 deletions pkgbuild/archlinux/python2/dirname.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,22 @@
$FileInfo: dirname.py - Last Update: 2/15/2016 Ver. 0.0.5 RC 3 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
unicode_literals)

import argparse
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
import argparse

__version_info__ = (0, 0, 5, "rc3")
if (__version_info__[3] is not None):
__version__ = str(__version_info__[0]) + "." + str(__version_info__[1]) + "." + str(
__version_info__[2]) + "+" + str(__version_info__[3])
if (__version_info__[3] is None):
__version__ = str(__version_info__[
0]) + "." + str(__version_info__[1]) + "." + str(__version_info__[2])
if(__version_info__[3] != None):
__version__ = str(__version_info__[0])+"."+str(__version_info__[1])+"."+str(
__version_info__[2])+"+"+str(__version_info__[3])
if(__version_info__[3] == None):
__version__ = str(
__version_info__[0])+"."+str(__version_info__[1])+"."+str(__version_info__[2])

proname = "dirname"
prover = __version__
profullname = proname + " " + prover
profullname = proname+" "+prover

parser = argparse.ArgumentParser(conflict_handler="resolve", add_help=True)
parser.add_argument("-v", "--version", action="version", version=profullname)
Expand Down
208 changes: 98 additions & 110 deletions pkgbuild/archlinux/python2/pypac-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,28 @@
$FileInfo: pypac-gen.py - Last Update: 6/1/2016 Ver. 0.2.0 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
unicode_literals)

import argparse
import datetime
import hashlib
import json
import os
from __future__ import absolute_import, division, print_function, unicode_literals
import re
import subprocess
import os
import sys
import time
import datetime
import argparse
import hashlib
import subprocess
import json

__version_info__ = (0, 2, 0, "rc1")
if (__version_info__[3] is not None):
__version__ = str(__version_info__[0]) + "." + str(__version_info__[1]) + "." + str(
__version_info__[2]) + "+" + str(__version_info__[3])
if (__version_info__[3] is None):
__version__ = str(__version_info__[
0]) + "." + str(__version_info__[1]) + "." + str(__version_info__[2])
if(__version_info__[3] != None):
__version__ = str(__version_info__[0])+"."+str(__version_info__[1])+"."+str(
__version_info__[2])+"+"+str(__version_info__[3])
if(__version_info__[3] == None):
__version__ = str(
__version_info__[0])+"."+str(__version_info__[1])+"."+str(__version_info__[2])

proname = "pypac-gen"
prover = __version__
profullname = proname + " " + prover
profullname = proname+" "+prover


def which_exec(execfile):
Expand All @@ -63,20 +61,17 @@ def which_exec(execfile):
action="store_true", help="get pkg source")
getargs = parser.parse_args()
getargs.source = os.path.realpath(getargs.source)
pkgsetuppy = os.path.realpath(getargs.source + os.path.sep + "setup.py")
pkgsetuppy = os.path.realpath(getargs.source+os.path.sep+"setup.py")
pyexecpath = os.path.realpath(sys.executable)
if (not os.path.exists(getargs.source) or not os.path.isdir(getargs.source)):
if(not os.path.exists(getargs.source) or not os.path.isdir(getargs.source)):
raise Exception("Could not find directory.")
if (not os.path.exists(pkgsetuppy) or not os.path.isfile(pkgsetuppy)):
if(not os.path.exists(pkgsetuppy) or not os.path.isfile(pkgsetuppy)):
raise Exception("Could not find setup.py in directory.")

pypkgenlistp = subprocess.Popen([pyexecpath,
pkgsetuppy,
"getversioninfo"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
pypkgenlistp = subprocess.Popen(
[pyexecpath, pkgsetuppy, "getversioninfo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
pypkgenout, pypkgenerr = pypkgenlistp.communicate()
if (sys.version[0] == "3"):
if(sys.version[0] == "3"):
pypkgenout = pypkgenout.decode('utf-8')
pymodule = json.loads(pypkgenout)
setuppy_verinfo = pymodule['versionlist']
Expand All @@ -92,79 +87,78 @@ def which_exec(execfile):
setuppy_longdescription = pymodule['longdescription']
setuppy_platforms = pymodule['platforms']

if (sys.version[0] == "2"):
if(sys.version[0] == "2"):
pkgsource = "py2www-get"
if (sys.version[0] == "3"):
if(sys.version[0] == "3"):
pkgsource = "py3www-get"
pkgupstreamname = "PyWWW-Get"
pkgveralt = str(setuppy_verinfo[0]) + "." + \
str(setuppy_verinfo[1]) + "." + str(setuppy_verinfo[2])
pkgveralt = str(setuppy_verinfo[0])+"." + \
str(setuppy_verinfo[1])+"."+str(setuppy_verinfo[2])
pkgveraltrel = str(setuppy_verinfo[4])
pkgver = str(pkgveralt) + "-rc" + str(setuppy_verinfo[4])
pkgver = str(pkgveralt)+"-rc"+str(setuppy_verinfo[4])
pkgurgency = "urgency=low"
pkgauthorname = setuppy_author
pkgauthoremail = setuppy_authoremail
pkgauthoremailalt = setuppy_authoremail.replace(
"@", "[at]").replace(".", "[dot]")
pkgauthor = pkgauthorname + " <" + pkgauthoremail + ">"
pkgauthoralt = pkgauthorname + " <" + pkgauthoremailalt + ">"
pkgauthor = pkgauthorname+" <"+pkgauthoremail+">"
pkgauthoralt = pkgauthorname+" <"+pkgauthoremailalt+">"
pkgmaintainername = setuppy_maintainer
pkgmaintaineremail = setuppy_maintaineremail
pkgmaintaineremailalt = setuppy_maintaineremail.replace(
"@", "[at]").replace(".", "[dot]")
pkgmaintainer = pkgmaintainername + " <" + pkgmaintaineremail + ">"
pkgmaintaineralt = pkgmaintainername + " <" + pkgmaintaineremailalt + ">"
pkgmaintainer = pkgmaintainername+" <"+pkgmaintaineremail+">"
pkgmaintaineralt = pkgmaintainername+" <"+pkgmaintaineremailalt+">"
pkggiturl = "https://github.com/GameMaker2k/PyWWW-Get.git"
pkghomepage = setuppy_url
pkgsection = "python"
pkgpriority = "optional"
if (sys.version[0] == "2"):
if(sys.version[0] == "2"):
pkgbuilddepends = "'python2'"
if (sys.version[0] == "3"):
if(sys.version[0] == "3"):
pkgbuilddepends = "'python'"
pkgstandardsversion = "3.9.8"
if (sys.version[0] == "2"):
if(sys.version[0] == "2"):
pkgpackage = "python2-pywww-get"
pkgoldname = "python2-www-get"
if (sys.version[0] == "3"):
if(sys.version[0] == "3"):
pkgpackage = "python-pywww-get"
pkgoldname = "python-www-get"
pkgarchitecture = "'any' 'i686' 'x86_64'"
if (sys.version[0] == "2"):
if(sys.version[0] == "2"):
pkgdepends = "'python2-setuptools'"
if (sys.version[0] == "3"):
if(sys.version[0] == "3"):
pkgdepends = "'python-setuptools'"
pkgdescription = setuppy_description + "\n " + setuppy_longdescription
pkgdescription = setuppy_description+"\n "+setuppy_longdescription
pkgtzstr = time.strftime("%a, %d %b %Y %H:%M:%S %z")

if (getargs.getsource):
if(getargs.getsource == True):
print(getargs.source)
sys.exit()
if (getargs.getparent):
if(getargs.getparent == True):
print(os.path.realpath(os.path.dirname(getargs.source)))
sys.exit()
if (getargs.getdirname):
print(pkgsource + "_" + pkgveralt + ".orig")
if(getargs.getdirname == True):
print(pkgsource+"_"+pkgveralt+".orig")
sys.exit()
if (getargs.gettarname):
print(pkgsource + "_" + pkgveralt + ".orig.tar.gz")
if(getargs.gettarname == True):
print(pkgsource+"_"+pkgveralt+".orig.tar.gz")
sys.exit()
if (getargs.getpkgsource):
if(getargs.getpkgsource == True):
print(pkgsource)
sys.exit()

print("generating arch linux package build directory")

pacpkg_pkgbuild_dir = os.path.realpath(
getargs.source + os.path.sep + pkgsource)
print("creating directory " + pacpkg_pkgbuild_dir)
if (not os.path.exists(pacpkg_pkgbuild_dir)):
pacpkg_pkgbuild_dir = os.path.realpath(getargs.source+os.path.sep+pkgsource)
print("creating directory "+pacpkg_pkgbuild_dir)
if(not os.path.exists(pacpkg_pkgbuild_dir)):
os.makedirs(pacpkg_pkgbuild_dir)
os.chmod(pacpkg_pkgbuild_dir, int("0755", 8))

gzparentdir = os.path.realpath(os.path.dirname(getargs.source))
filetargz = open(os.path.realpath(gzparentdir + os.path.sep +
pkgsource + "_" + pkgveralt + ".orig.tar.gz"), "rb")
filetargz = open(os.path.realpath(gzparentdir+os.path.sep +
pkgsource+"_"+pkgveralt+".orig.tar.gz"), "rb")
filetargzmd5 = hashlib.md5(filetargz.read()).hexdigest()
filetargz.seek(0)
filetargzsha1 = hashlib.sha1(filetargz.read()).hexdigest()
Expand All @@ -179,85 +173,79 @@ def which_exec(execfile):
filetargz.close()

pacpkg_pkgbuild_file = os.path.realpath(
pacpkg_pkgbuild_dir + os.path.sep + "PKGBUILD")
print("generating file " + pacpkg_pkgbuild_file)
if (sys.version[0] == "2"):
pacpkg_string_temp = "# Maintainer: " + pkgmaintaineralt + "\n"
pacpkg_string_temp += "# This file was automatically generated by " + \
profullname + " at\n"
pacpkg_string_temp += "# " + pkgtzstr + "\n\n"
pacpkg_string_temp += "pkgname=" + pkgpackage + "\n"
pacpkg_string_temp += "pkgver=" + pkgveralt + "\n"
pacpkg_string_temp += "pkgrel=" + pkgveraltrel + "\n"
pacpkg_string_temp += "pkgdesc='" + setuppy_description + "'\n"
pacpkg_string_temp += "url='" + setuppy_url + "'\n"
pacpkg_string_temp += "arch=(" + pkgarchitecture + ")\n"
pacpkg_string_temp += "license=('" + setuppy_license + "')\n"
pacpkg_pkgbuild_dir+os.path.sep+"PKGBUILD")
print("generating file "+pacpkg_pkgbuild_file)
if(sys.version[0] == "2"):
pacpkg_string_temp = "# Maintainer: "+pkgmaintaineralt+"\n"
pacpkg_string_temp += "# This file was automatically generated by "+profullname+" at\n"
pacpkg_string_temp += "# "+pkgtzstr+"\n\n"
pacpkg_string_temp += "pkgname="+pkgpackage+"\n"
pacpkg_string_temp += "pkgver="+pkgveralt+"\n"
pacpkg_string_temp += "pkgrel="+pkgveraltrel+"\n"
pacpkg_string_temp += "pkgdesc='"+setuppy_description+"'\n"
pacpkg_string_temp += "url='"+setuppy_url+"'\n"
pacpkg_string_temp += "arch=("+pkgarchitecture+")\n"
pacpkg_string_temp += "license=('"+setuppy_license+"')\n"
pacpkg_string_temp += "groups=()\n"
pacpkg_string_temp += "depends=(" + pkgbuilddepends + ")\n"
pacpkg_string_temp += "depends=("+pkgbuilddepends+")\n"
pacpkg_string_temp += "optdepends=()\n"
pacpkg_string_temp += "makedepends=(" + pkgdepends + ")\n"
pacpkg_string_temp += "makedepends=("+pkgdepends+")\n"
pacpkg_string_temp += "conflicts=()\n"
pacpkg_string_temp += "replaces=('" + pkgoldname + "')\n"
pacpkg_string_temp += "replaces=('"+pkgoldname+"')\n"
pacpkg_string_temp += "backup=()\n"
pacpkg_string_temp += "options=(!strip !emptydirs)\n"
pacpkg_string_temp += "install=''\n"
pacpkg_string_temp += "source=('." + os.path.sep + \
pkgsource + "_" + pkgveralt + ".orig.tar.gz')\n"
pacpkg_string_temp += "md5sums=('" + filetargzmd5 + "')\n"
pacpkg_string_temp += "sha1sums=('" + filetargzsha1 + "')\n"
pacpkg_string_temp += "sha224sums=('" + filetargzsha224 + "')\n"
pacpkg_string_temp += "sha256sums=('" + filetargzsha256 + "')\n"
pacpkg_string_temp += "sha384sums=('" + filetargzsha384 + "')\n"
pacpkg_string_temp += "sha512sums=('" + filetargzsha512 + "')\n\n"
pacpkg_string_temp += "source=('."+os.path.sep + \
pkgsource+"_"+pkgveralt+".orig.tar.gz')\n"
pacpkg_string_temp += "md5sums=('"+filetargzmd5+"')\n"
pacpkg_string_temp += "sha1sums=('"+filetargzsha1+"')\n"
pacpkg_string_temp += "sha224sums=('"+filetargzsha224+"')\n"
pacpkg_string_temp += "sha256sums=('"+filetargzsha256+"')\n"
pacpkg_string_temp += "sha384sums=('"+filetargzsha384+"')\n"
pacpkg_string_temp += "sha512sums=('"+filetargzsha512+"')\n\n"
pacpkg_string_temp += "build() {\n"
pacpkg_string_temp += " cd \"${srcdir}/" + \
pkgsource + "_${pkgver}.orig\"\n"
pacpkg_string_temp += " cd \"${srcdir}/"+pkgsource+"_${pkgver}.orig\"\n"
pacpkg_string_temp += " python2 ./setup.py build\n"
pacpkg_string_temp += "}\n\n"
pacpkg_string_temp += "package() {\n"
pacpkg_string_temp += " cd \"${srcdir}/" + \
pkgsource + "_${pkgver}.orig\"\n"
pacpkg_string_temp += " cd \"${srcdir}/"+pkgsource+"_${pkgver}.orig\"\n"
pacpkg_string_temp += " python2 ./setup.py install --root=\"${pkgdir}\" --optimize=1\n"
pacpkg_string_temp += "}\n\n"
pacpkg_string_temp += "# vim:set ts=2 sw=2 et:\n"
if (sys.version[0] == "3"):
pacpkg_string_temp = "# Maintainer: " + pkgmaintaineralt + "\n"
pacpkg_string_temp += "# This file was automatically generated by " + \
profullname + " at\n"
pacpkg_string_temp += "# " + pkgtzstr + "\n\n"
pacpkg_string_temp += "pkgname=" + pkgpackage + "\n"
pacpkg_string_temp += "pkgver=" + pkgveralt + "\n"
pacpkg_string_temp += "pkgrel=" + pkgveraltrel + "\n"
pacpkg_string_temp += "pkgdesc='" + setuppy_description + "'\n"
pacpkg_string_temp += "url='" + setuppy_url + "'\n"
pacpkg_string_temp += "arch=(" + pkgarchitecture + ")\n"
pacpkg_string_temp += "license=('" + setuppy_license + "')\n"
if(sys.version[0] == "3"):
pacpkg_string_temp = "# Maintainer: "+pkgmaintaineralt+"\n"
pacpkg_string_temp += "# This file was automatically generated by "+profullname+" at\n"
pacpkg_string_temp += "# "+pkgtzstr+"\n\n"
pacpkg_string_temp += "pkgname="+pkgpackage+"\n"
pacpkg_string_temp += "pkgver="+pkgveralt+"\n"
pacpkg_string_temp += "pkgrel="+pkgveraltrel+"\n"
pacpkg_string_temp += "pkgdesc='"+setuppy_description+"'\n"
pacpkg_string_temp += "url='"+setuppy_url+"'\n"
pacpkg_string_temp += "arch=("+pkgarchitecture+")\n"
pacpkg_string_temp += "license=('"+setuppy_license+"')\n"
pacpkg_string_temp += "groups=()\n"
pacpkg_string_temp += "depends=(" + pkgbuilddepends + ")\n"
pacpkg_string_temp += "depends=("+pkgbuilddepends+")\n"
pacpkg_string_temp += "optdepends=()\n"
pacpkg_string_temp += "makedepends=(" + pkgdepends + ")\n"
pacpkg_string_temp += "makedepends=("+pkgdepends+")\n"
pacpkg_string_temp += "conflicts=()\n"
pacpkg_string_temp += "replaces=('" + pkgoldname + "')\n"
pacpkg_string_temp += "replaces=('"+pkgoldname+"')\n"
pacpkg_string_temp += "backup=()\n"
pacpkg_string_temp += "options=(!strip !emptydirs)\n"
pacpkg_string_temp += "install=''\n"
pacpkg_string_temp += "source=('." + os.path.sep + \
pkgsource + "_" + pkgveralt + ".orig.tar.gz')\n"
pacpkg_string_temp += "md5sums=('" + filetargzmd5 + "')\n"
pacpkg_string_temp += "sha1sums=('" + filetargzsha1 + "')\n"
pacpkg_string_temp += "sha224sums=('" + filetargzsha224 + "')\n"
pacpkg_string_temp += "sha256sums=('" + filetargzsha256 + "')\n"
pacpkg_string_temp += "sha384sums=('" + filetargzsha384 + "')\n"
pacpkg_string_temp += "sha512sums=('" + filetargzsha512 + "')\n\n"
pacpkg_string_temp += "source=('."+os.path.sep + \
pkgsource+"_"+pkgveralt+".orig.tar.gz')\n"
pacpkg_string_temp += "md5sums=('"+filetargzmd5+"')\n"
pacpkg_string_temp += "sha1sums=('"+filetargzsha1+"')\n"
pacpkg_string_temp += "sha224sums=('"+filetargzsha224+"')\n"
pacpkg_string_temp += "sha256sums=('"+filetargzsha256+"')\n"
pacpkg_string_temp += "sha384sums=('"+filetargzsha384+"')\n"
pacpkg_string_temp += "sha512sums=('"+filetargzsha512+"')\n\n"
pacpkg_string_temp += "build() {\n"
pacpkg_string_temp += " cd \"${srcdir}/" + \
pkgsource + "_${pkgver}.orig\"\n"
pacpkg_string_temp += " cd \"${srcdir}/"+pkgsource+"_${pkgver}.orig\"\n"
pacpkg_string_temp += " python3 ./setup.py build\n"
pacpkg_string_temp += "}\n\n"
pacpkg_string_temp += "package() {\n"
pacpkg_string_temp += " cd \"${srcdir}/" + \
pkgsource + "_${pkgver}.orig\"\n"
pacpkg_string_temp += " cd \"${srcdir}/"+pkgsource+"_${pkgver}.orig\"\n"
pacpkg_string_temp += " python3 ./setup.py install --root=\"${pkgdir}\" --optimize=1\n"
pacpkg_string_temp += "}\n\n"
pacpkg_string_temp += "# vim:set ts=2 sw=2 et:\n"
Expand Down
Loading

0 comments on commit 0f19c2e

Please sign in to comment.