Skip to content

Instantly share code, notes, and snippets.

@mateusz-fiolka
Created July 27, 2012 19:16
Show Gist options
  • Save mateusz-fiolka/3189930 to your computer and use it in GitHub Desktop.
Save mateusz-fiolka/3189930 to your computer and use it in GitHub Desktop.
#!/bin/bash -x
# Maintainer: Cedric Sougne <[email protected]>
pkgname=oracle-xe
pkgver=11.2.0_1.0
pkgrel=1
pkgdesc="a non free DBMS"
url="http://www.oracle.com/"
license=('custom')
arch=('x86_64')
conflicts=('oracle-xe')
provides=('oracle-xe')
options=('!strip')
depends=('libaio>=0.3.104' 'gcc>=4.1.2' 'binutils>=2.16.91.0.5' 'make>=3.80' 'glibc>=2.3.4-2.41')
makedepends=('rpmextract')
install='oracle.install'
source=('oracle-xe-11.2.0-1.0.x86_64.rpm.zip'
'oracle_env.csh'
'oracle_env.sh'
'oracle-xe'
'oracle-xe.conf'
'listener.ora'
)
md5sums=('1fcc1158771eecf1c22f48cab65feda9'
'52787ddc5b4c326f333b0a250bb458fa'
'5dfe9321cb6db2547de95c58546309f8'
'e558d7dcb9e455f8cb03db8638832774'
'5a3eaff3cb867d97cd250f04fe372ae7'
'4d4a2e1bcc29b9c1fd197b42ccc4e0ac'
)
build() {
cd $srcdir
rpmextract.sh Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm
mkdir -p $pkgdir/etc/rc.d
cp $startdir/oracle-xe $pkgdir/etc/rc.d/
chmod +x $pkgdir/etc/rc.d/oracle-xe
mkdir -p $pkgdir/usr/lib
mv $srcdir/u01/app/oracle $pkgdir/usr/lib/
# Fix the listener.ora
cp -f $startdir/listener.ora $pkgdir/usr/lib/oracle/product/11.2.0/xe/network/admin/
find $pkgdir -exec chmod 755 {} \;
# Export environment variables
mkdir -p $pkgdir/etc/profile.d
cp $startdir/oracle_env.* $pkgdir/etc/profile.d/
chmod +x $pkgdir/etc/profile.d/oracle_env.*
# Desktop files
cp -a $srcdir/usr $pkgdir
# LD_LIBRARY_PATH
mkdir -p $pkgdir/etc/ld.so.conf.d/
cp $startdir/oracle-xe.conf $pkgdir/etc/ld.so.conf.d/
# License
mkdir -p $pkgdir/usr/share/licenses/custom/$pkgname
cp $srcdir/usr/share/doc/oracle_xe/LICENSE $pkgdir/usr/share/licenses/custom/$pkgname
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment