summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Eleftheriou2015-07-17 00:34:28 +0200
committerGeorge Eleftheriou2015-07-17 00:34:28 +0200
commita0b12f9a5546ddb898baa1d4527e35497abee7ec (patch)
tree0259629792891fe722e40953c7d1d15b09543de5
parente667a7260a317df2c8079263808cafbf5177656a (diff)
downloadaur-a0b12f9a5546ddb898baa1d4527e35497abee7ec.tar.gz
Minor fixes and modifications in PKGBUILD and .install file
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD38
-rw-r--r--openfoam.install14
3 files changed, 34 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b4db4d35508c..5d27dba7d263 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,10 @@
pkgbase = openfoam
pkgdesc = The open source CFD toolbox
pkgver = 2.4.0
- pkgrel = 1
+ pkgrel = 2
url = http://www.openfoam.com
install = openfoam.install
- arch = i686
- arch = x86_64
+ arch = any
license = GPL
depends = bzip2
depends = paraview
@@ -16,13 +15,11 @@ pkgbase = openfoam
depends = cgal
source = http://downloads.sourceforge.net/foam/OpenFOAM-2.4.0.tgz
source = decomp-options.patch
- source = openfoam.install
source = paraFoam.patch
source = scotch-options.patch
source = settings.patch
sha256sums = aac4c9e2cc1b54724292add3e182ebf923a0929978e3b5ba524c97ce75477706
sha256sums = 3faef066228df77bad5b329bf251fc057dc5dac3b749d5bcd292438f89a546b7
- sha256sums = 5490b770952a853532955c5da6c37de4ba13e9a29dc06b11d3dbeba292300f85
sha256sums = cdd8c599f34cc967e6fb75b7da5f337aa7b56b19cf0871ebf608af6507abe07c
sha256sums = bbf370e411dc7fd95c3d823dac3534d4312fe90c0365b596aa2a3ed016463819
sha256sums = 9f36415505d71d86a7f18624f8ed9888f8fa7af09833b0dd215477ddca57302f
diff --git a/PKGBUILD b/PKGBUILD
index 2b096bea588c..60ffb8d2c822 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
-# Contributor: Andrew Fischer <andrew_at_apastron.co>
# Maintainer: George Eleftheriou <eleftg>
+# Contributor: Andrew Fischer <andrew_at_apastron.co>
pkgname=openfoam
@@ -7,22 +7,20 @@ pkgname=openfoam
_distpkgname=OpenFOAM
pkgver=2.4.0
-pkgrel=1
+pkgrel=2
pkgdesc="The open source CFD toolbox"
-arch=('i686' 'x86_64')
+arch=("any")
url="http://www.openfoam.com"
-license=('GPL')
+license=("GPL")
depends=('bzip2' 'paraview' 'parmetis' 'scotch' 'boost' 'flex' 'cgal')
source=("http://downloads.sourceforge.net/foam/${_distpkgname}-${pkgver}.tgz"
"decomp-options.patch"
- "openfoam.install"
"paraFoam.patch"
"scotch-options.patch"
"settings.patch")
-install=openfoam.install
+install="${pkgname}.install"
sha256sums=('aac4c9e2cc1b54724292add3e182ebf923a0929978e3b5ba524c97ce75477706'
'3faef066228df77bad5b329bf251fc057dc5dac3b749d5bcd292438f89a546b7'
- '5490b770952a853532955c5da6c37de4ba13e9a29dc06b11d3dbeba292300f85'
'cdd8c599f34cc967e6fb75b7da5f337aa7b56b19cf0871ebf608af6507abe07c'
'bbf370e411dc7fd95c3d823dac3534d4312fe90c0365b596aa2a3ed016463819'
'9f36415505d71d86a7f18624f8ed9888f8fa7af09833b0dd215477ddca57302f')
@@ -34,21 +32,21 @@ prepare() {
_sversion=`pacman -Q scotch | sed -e 's/.* //; s/-.*//g'`
# Generate and install the system preferences file
- echo "compilerInstall=system" > ${startdir}/prefs.sh
- echo "export WM_MPLIB=SYSTEMOPENMPI" >> ${startdir}/prefs.sh
- echo "export ParaView_VERSION=${_pversion}" >> ${startdir}/prefs.sh
- echo "export ParaView_MAJOR=${_pmajor}" >> ${startdir}/prefs.sh
- cp ${startdir}/prefs.sh ${srcdir}/${_distpkgname}-${pkgver}/etc || return 1
+ echo "compilerInstall=system" > ${srcdir}/prefs.sh
+ echo "export WM_MPLIB=SYSTEMOPENMPI" >> ${srcdir}/prefs.sh
+ echo "export ParaView_VERSION=${_pversion}" >> ${srcdir}/prefs.sh
+ echo "export ParaView_MAJOR=${_pmajor}" >> ${srcdir}/prefs.sh
+ cp ${srcdir}/prefs.sh ${srcdir}/${_distpkgname}-${pkgver}/etc || return 1
# Generate the scotch.sh file for arch
- echo "export SCOTCH_VERSION=scotch_${_sversion}" > ${startdir}/scotch.sh
- echo "export SCOTCH_ARCH_PATH=/usr" >> ${startdir}/scotch.sh
- cp ${startdir}/scotch.sh ${srcdir}/${_distpkgname}-${pkgver}/etc/config || return 1
+ echo "export SCOTCH_VERSION=scotch_${_sversion}" > ${srcdir}/scotch.sh
+ echo "export SCOTCH_ARCH_PATH=/usr" >> ${srcdir}/scotch.sh
+ cp ${srcdir}/scotch.sh ${srcdir}/${_distpkgname}-${pkgver}/etc/config || return 1
# Patch for archlinux parmetis, paraview and openmpi paths, and scotch link lines
- patch -p1 < ${startdir}/decomp-options.patch
- patch -p1 < ${startdir}/paraFoam.patch
- patch -p1 < ${startdir}/scotch-options.patch
+ patch -p1 < ${srcdir}/decomp-options.patch
+ patch -p1 < ${srcdir}/paraFoam.patch
+ patch -p1 < ${srcdir}/scotch-options.patch
}
build() {
@@ -66,7 +64,7 @@ build() {
}
package() {
- cd ${startdir}
+ cd ${srcdir}
# Create destination directories
install -d ${pkgdir}/opt/${_distpkgname} ${pkgdir}/etc/profile.d || return 1
@@ -76,7 +74,7 @@ package() {
# Add source file
echo "export FOAM_INST_DIR=/opt/${_distpkgname}" > ${pkgdir}/etc/profile.d/openfoam.sh || return 1
- echo "source \${FOAM_INST_DIR}/${_distpkgname}-${pkgver}/etc/bashrc" >> ${pkgdir}/etc/profile.d/openfoam.sh || return 1
+ echo "alias ofoam=\"source \${FOAM_INST_DIR}/${_distpkgname}-${pkgver}/etc/bashrc\"" >> ${pkgdir}/etc/profile.d/openfoam.sh || return 1
# Add stub thirdparty directory to keep openfoam happy
install -d ${pkgdir}/opt/${_distpkgname}/ThirdParty-${pkgver} || return 1
diff --git a/openfoam.install b/openfoam.install
index b37ae23a2c4d..286b28312809 100644
--- a/openfoam.install
+++ b/openfoam.install
@@ -1,5 +1,7 @@
+# arg 1: the new package version
post_install() {
echo "NOTE:"
+ echo ""
echo "This install of OpenFOAM does NOT include the"
echo "ThirdParty libraries from openfoam's website."
echo "It simply creates a stub OpenFOAM/ThirdParty"
@@ -14,4 +16,16 @@ post_install() {
echo "If you need other components of the ThirdParty bundle"
echo "it will have to be installed manually."
echo "See http://www.openfoam.com/download/source.php for details."
+ echo ""
+ echo "Don't forget to run the \"ofoam\" alias in order to"
+ echo "source the OpenFOAM environment (PATH + LD_LIBRARY_PATH)."
+ echo "This alias has been introduced in order to avoid"
+ echo "PATH clashes (e.g. other executables such as R from GNU R)"
+ echo ""
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
}