summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rijksen2017-09-26 11:50:16 -0400
committerNathan Rijksen2017-09-26 11:50:16 -0400
commit4ae16878fdbc8500624175f3d760a53b0455e955 (patch)
tree9e095b20bbc7051d58c4584102def607fdd94875
downloadaur-4ae16878fdbc8500624175f3d760a53b0455e955.tar.gz
Initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD63
-rw-r--r--_install.py.patch68
-rw-r--r--activestate.py.patch34
4 files changed, 191 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d1f12fe347de
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = komodo-ide
+ pkgdesc = Code smarter and faster with the leading IDE for today's major web languages, including Python, PHP, Node.js, Perl, Go and Ruby. - XUL based
+ pkgver = 11.0.0_90668
+ pkgrel = 1
+ url = http://www.activestate.com/komodo-ide
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = dbus-glib
+ depends = glibc>=2.4
+ depends = libjpeg-turbo
+ depends = gcc-libs
+ depends = gtk2
+ optdepends = xterm: can be used for running certain commands
+ options = !strip
+ source = _install.py.patch
+ source = activestate.py.patch
+ sha256sums = beb35ae529bffd998784bc1e51468bf5bf64e5d8f84e3eb2c4af07c8807b101a
+ sha256sums = 7f6efb3d3b8959b9a85aa7056094932686b3aea60880a06a559cf12e1f2e6231
+ source_i686 = http://downloads.activestate.com/Komodo/releases/11.0.0/Komodo-IDE-11.0.0-90668-linux-x86.tar.gz
+ sha256sums_i686 = f263e4a2a85d8933a33281807b5c01c4b1724f39ca39edd31842d0ef02e7dcbe
+ source_x86_64 = http://downloads.activestate.com/Komodo/releases/11.0.0/Komodo-IDE-11.0.0-90668-linux-x86_64.tar.gz
+ sha256sums_x86_64 = 3496449a7588dd39bf9a211c11cfe67e6ef6038e06513ad973d567a738ba1d2c
+
+pkgname = komodo-ide
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f23b2525a03f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Nathan Rijksen <nathanr+aur@activestate.com>
+# Contributor: max-k <max-k@post.com>
+# Based on https://aur.archlinux.org/packages/komodo-edit (by max-k)
+
+if [ $(uname -m) = "x86_64" ] ; then
+_arch="x86_64"
+else
+_arch="x86"
+fi
+
+_major="11.0.0"
+_minor=90668
+
+pkgname="komodo-ide"
+_bigname="Komodo-IDE"
+pkgver="${_major}_${_minor}"
+pkgrel=1
+pkgdesc="Code smarter and faster with the leading IDE for today's major web languages, including Python, PHP, Node.js, Perl, Go and Ruby. - XUL based"
+arch=(i686 x86_64)
+url="http://www.activestate.com/komodo-ide"
+license=('custom')
+depends=('dbus-glib' 'glibc>=2.4' 'libjpeg-turbo' 'gcc-libs' 'gtk2')
+optdepends=('xterm: can be used for running certain commands')
+options=('!strip')
+
+source=('_install.py.patch' 'activestate.py.patch')
+_srcbase="http://downloads.activestate.com/Komodo/releases"
+source_i686=("${_srcbase}/${_major}/${_bigname}-${_major}-${_minor}-linux-x86.tar.gz")
+source_x86_64=("${_srcbase}/${_major}/${_bigname}-${_major}-${_minor}-linux-x86_64.tar.gz")
+
+sha256sums=('beb35ae529bffd998784bc1e51468bf5bf64e5d8f84e3eb2c4af07c8807b101a'
+ '7f6efb3d3b8959b9a85aa7056094932686b3aea60880a06a559cf12e1f2e6231')
+sha256sums_i686=('f263e4a2a85d8933a33281807b5c01c4b1724f39ca39edd31842d0ef02e7dcbe')
+sha256sums_x86_64=('3496449a7588dd39bf9a211c11cfe67e6ef6038e06513ad973d567a738ba1d2c')
+
+prepare() {
+ cd ${srcdir}/${_bigname}-${_major}-${_minor}-linux-${_arch}
+ sed -i "s/__VERSION__/${_major}-${_minor}/" ${srcdir}/_install.py.patch
+ sed -i "s/__VERSION__/${_major}-${_minor}/" ${srcdir}/activestate.py.patch
+ if [ $_arch == "x86_64" ] ; then
+ sed -i "s/__ARCH__/x86_64/" ${srcdir}/_install.py.patch
+ sed -i "s/__ARCH__/x86_64/" ${srcdir}/activestate.py.patch
+ else
+ sed -i "s/__ARCH__/x86/" ${srcdir}/_install.py.patch
+ sed -i "s/__ARCH__/x86/" ${srcdir}/activestate.py.patch
+ fi
+ patch -p0 -i ${srcdir}/_install.py.patch support/_install.py
+ patch -p0 -i ${srcdir}/activestate.py.patch INSTALLDIR/lib/python/lib/python*.*/activestate.py
+}
+
+build() {
+ echo "" > /dev/null
+}
+
+package() {
+ cd ${srcdir}/${_bigname}-${_major}-${_minor}-linux-${_arch}
+ ./install.sh -v -s -I ${pkgdir}/opt/${pkgname} --dest-dir /opt/${pkgname} 2>&1 > /dev/null
+ _dfile=${pkgdir}/opt/${pkgname}/share/desktop/${pkgname}-${_major:0:2}.desktop
+ sed -i "s#${pkgdir}##" ${_dfile}
+ install -Dm644 ${_dfile} ${pkgdir}/usr/share/applications/${pkgname}.desktop
+ install -d ${pkgdir}/usr/bin
+ ln -sf /opt/${pkgname}/bin/komodo ${pkgdir}/usr/bin/komodo
+}
diff --git a/_install.py.patch b/_install.py.patch
new file mode 100644
index 000000000000..4087a05564bf
--- /dev/null
+++ b/_install.py.patch
@@ -0,0 +1,68 @@
+--- Komodo-IDE-__VERSION__-linux-__ARCH__/support/_install.py2013-10-17 05:13: 50.000000000 +0200
++++ src/Komodo-IDE-__VERSION__-linux-__ARCH__/support/_install.py2013-11-18 18:39:56.767640864 +0100
+@@ -349,10 +349,7 @@
+ log.warn("unexpected error creating fallback .desktop file "
+ "'%s': %s", fallbackPath, ex2)
+ else:
+- log.warn("did not install desktop shortcut: %s "
+- "(a Komodo .desktop file has been created in '%s' "
+- "that you may install manually)",
+- ex, fallbackPath)
++ pass
+ else:
+ log.info("'Komodo Edit 8' desktop shortcut created at '%s'",
+ shortcutPath)
+@@ -440,19 +437,23 @@
+ absInstallDir = abspath(normInstallDir)
+ pyInstallDir = join(absInstallDir, "lib", "python")
+ mozInstallDir = join(absInstallDir, "lib", "mozilla")
+- log.info("Installing ActiveState Komodo to '%s'...", normInstallDir)
++ print("Installing ActiveState Komodo to '%s'..." % normInstallDir)
+ _validateInstallDir(absInstallDir)
+ log.debug("redirect userDataDir to '%s'", userDataDir)
+ log.debug("user environment: %s", pprint.pformat(dict(os.environ)))
+
+ # "destDir", if defined, is the ultimate final install location. We
+ # want to relocate to that dir.
++ absRelocDir = absInstallDir
++ pyRelocDir = pyInstallDir
+ if destDir is None:
+- absRelocDir = absInstallDir
+- pyRelocDir = pyInstallDir
++ absRelocDestDir = absInstallDir
++ pyRelocDestDir = pyInstallDir
+ else:
+- absRelocDir = abspath(normpath(expanduser(destDir)))
+- pyRelocDir = join(absRelocDir, "lib", "python")
++ absRelocDestDir = abspath(normpath(expanduser(destDir)))
++ pyRelocDestDir = join(absRelocDestDir, "lib", "python")
++
++ print("Python relocation directory : '%s'" % pyRelocDestDir)
+
+ # copy the entire "Komodo" tree to the installDir
+ if not exists(absInstallDir):
+@@ -466,7 +467,7 @@
+
+ log.debug("Preparing internal Python...")
+ import activestate
+- activestate.relocate_python(pyRelocDir,
++ activestate.relocate_python(pyRelocDir, dest_prefix=pyRelocDestDir,
+ verbose=log.isEnabledFor(logging.DEBUG))
+
+ # Make sure that we use symlinks for libpython.so, bug 98337
+@@ -696,6 +697,7 @@
+ suppressShortcut = True
+ elif opt in ("--dest-dir",):
+ destDir = optarg
++ print("Opt destDir = %s" % destDir)
+ if destDir and not installDir:
+ log.error("must use -I|--install-dir to use --dest-dir")
+ return 1
+@@ -704,6 +706,7 @@
+ if installDir is None:
+ interactiveInstall(suppressShortcut)
+ else:
++ print("Installation destDir = %s" % destDir)
+ install(installDir, suppressShortcut, destDir=destDir)
+ except (EnvironmentError, Error), ex:
+ log.error(str(ex)) \ No newline at end of file
diff --git a/activestate.py.patch b/activestate.py.patch
new file mode 100644
index 000000000000..af0ebebfcf5b
--- /dev/null
+++ b/activestate.py.patch
@@ -0,0 +1,34 @@
+--- Komodo-IDE-__VERSION__-linux-__ARCH__/INSTALLDIR/lib/python/lib/python2.7/activestate.py2013-08-15 00:21:03.000000000 +0200
++++ src/Komodo-IDE-__VERSION__-linux-__ARCH__/INSTALLDIR/lib/python/lib/python2.7/activestate.py2013-11-18 18:27:07.902501347 +0100
+@@ -182,7 +182,7 @@
+ os .chmod(path, perm) # restore permissions
+
+
+-def relocate_python(install_prefix, verbose=False):
++def relocate_python(install_prefix, dest_prefix=None, verbose=False):
+ """Relocate this Python installation.
+
+ "Relocation" involves updating hardcoded shebang lines in Python scripts
+@@ -210,16 +210,19 @@
+ % (install_prefix, len(install_prefix),
+ shortest_original_prefix_length))
+
+- log("relocate this Python to '%s'" % install_prefix)
++ if dest_prefix is None:
++ dest_prefix = install_prefix
++
++ print("relocate this Python to '%s'" % dest_prefix)
+ for prefix in prefixes:
+- if prefix == install_prefix:
++ if prefix == dest_prefix:
+ continue
+ for dirpath, dirnames, filenames in os.walk(install_prefix):
+ for filename in filenames:
+ if splitext(filename)[1] in (".pyo", ".pyc"):
+ continue
+ _relocate_path(join(dirpath, filename),
+- prefix, install_prefix, log)
++ prefix, dest_prefix, log)
+
+
+ #---- mainline \ No newline at end of file