summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingbei Li2017-10-16 18:35:44 +0800
committerJingbei Li2017-10-16 18:35:44 +0800
commit411d1cb5890096bede4d12c979a161f530533692 (patch)
tree043e3db838d4bf7230407000ad917aa1051b9e95
parent5633f919f788499e395651024ab4c9f6bab91cd4 (diff)
downloadaur-411d1cb5890096bede4d12c979a161f530533692.tar.gz
strip $pkgdir everywhere
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--install.py.patch78
3 files changed, 8 insertions, 86 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ae0175e05365..a1cd9e108293 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Oct 14 08:37:48 UTC 2017
+# Mon Oct 16 10:35:38 UTC 2017
pkgbase = anaconda2
pkgdesc = Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing.
pkgver = 5.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://store.continuum.io/cshop/anaconda/
install = anaconda2.install
arch = x86
diff --git a/PKGBUILD b/PKGBUILD
index e05d5484c6fc..cd640daad359 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=anaconda2
pkgver=5.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing."
arch=('x86' 'x86_64')
url="https://store.continuum.io/cshop/anaconda/"
@@ -28,17 +28,17 @@ package() {
prefix=${pkgdir}/opt/${pkgname}
LD_PRELOAD="/usr/lib/libfakeroot/libfakeroot.so"
- msg2 "Extracting default libraries"
- bash ${srcdir}/Anaconda2-${pkgver}-Linux-${_pkgarch}.sh -b -p $prefix
+ msg2 "Installing anaconda to /opt/${pkgname}"
+ bash ${srcdir}/Anaconda2-${pkgver}-Linux-${_pkgarch}.sh -b -p $prefix -f
cd $prefix
msg2 "Correcting permissions"
chmod a+r -R $prefix/pkgs
- msg2 "Stripping \$pkgdir from default meta"
- find conda-meta -name '*.json' -exec sed -e "s/${pkgdir//\//\\\/}//g" -i {} \;
+ msg2 "Stripping \$pkgdir"
+ sed "s|${pkgdir}||g" -i $(grep "$pkgdir" . -rIl)
msg2 "Installing license"
- install -D -m644 $prefix/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/install.py.patch b/install.py.patch
deleted file mode 100644
index e82c6d8b7bde..000000000000
--- a/install.py.patch
+++ /dev/null
@@ -1,78 +0,0 @@
---- a/pkgs/.install.py 2016-10-22 22:34:35.739932506 +0800
-+++ b/pkgs/.install.py 2016-10-22 22:35:04.296779737 +0800
-@@ -44,6 +44,7 @@
-
- # these may be changed in main()
- ROOT_PREFIX = sys.prefix
-+instdir = ROOT_PREFIX
- PKGS_DIR = join(ROOT_PREFIX, 'pkgs')
- SKIP_SCRIPTS = False
- FORCE = False
-@@ -1145,7 +1146,9 @@
- return res
-
-
--def update_prefix(path, new_prefix, placeholder, mode):
-+def update_prefix(path, new_prefix, placeholder, mode, instdir=None):
-+ if not instdir is None:
-+ new_prefix = instdir
- if on_win:
- # force all prefix replacements to forward slashes to simplify need
- # to escape backslashes - replace with unix-style path separators
-@@ -1269,7 +1272,7 @@
- return set(fn[:-5] for fn in os.listdir(meta_dir) if fn.endswith('.json'))
-
-
--def link(prefix, dist, linktype=LINK_HARD):
-+def link(prefix, dist, linktype=LINK_HARD, instdir=None):
- '''
- Link a package in a specified prefix. We assume that the packacge has
- been extra_info in either
-@@ -1309,7 +1312,7 @@
- for f in sorted(has_prefix_files):
- placeholder, mode = has_prefix_files[f]
- try:
-- update_prefix(join(prefix, f), prefix, placeholder, mode)
-+ update_prefix(join(prefix, f), prefix, placeholder, mode, instdir)
- except PaddingError:
- sys.exit("ERROR: placeholder '%s' too short in: %s\n" %
- (placeholder, dist))
-@@ -1384,7 +1387,7 @@
- prefix = prefix_env(env_name)
- for dist in dists:
- assert dist in IDISTS
-- link(prefix, dist, linktype)
-+ link(prefix, dist, linktype, instdir)
-
- for dist in duplicates_to_remove(linked(prefix), dists):
- meta_path = join(prefix, 'conda-meta', dist + '.json')
-@@ -1419,7 +1422,7 @@
-
-
- def main():
-- global ROOT_PREFIX, PKGS_DIR
-+ global ROOT_PREFIX, PKGS_DIR, instdir
-
- p = OptionParser(description="conda link tool used by installers")
-
-@@ -1428,6 +1431,10 @@
- default=abspath(join(__file__, '..', '..')),
- help="root prefix (defaults to %default)")
-
-+ p.add_option('--instdir',
-+ action="store",
-+ help="install dir (defaults to root prefix)")
-+
- p.add_option('--post',
- action="store",
- help="perform post extract (on a single package), "
-@@ -1439,6 +1446,10 @@ p.error('no arguments expected')
-
- ROOT_PREFIX = opts.root_prefix.replace('//', '/')
-+ if not opts.instdir:
-+ instdir = ROOT_PREFIX
-+ else:
-+ instdir = opts.instdir
- PKGS_DIR = join(ROOT_PREFIX, 'pkgs')
-
- if opts.post: