LiteSpeed Linux server2.poyrazhosting.com 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64 safemode : OFF MySQL: OFF | Perl: OFF | cURL: ON | WGet: OFF > / lib / rpm / | Server Ip : 172.67.216.244 |
Filename | /lib/rpm/brp-java-gcjcompile |
Size | 1.38 kb |
Permission | rwxr-xr-x |
Owner | |
Create time | 08-Dec-2022 22:35 |
Last modified | 24-Nov-2021 09:47 |
Last accessed | 24-Nov-2021 09:47 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/bin/sh
# If using normal root, avoid changing anything.
[ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ] && exit 0
# If we are a noarch package, avoid changing anything.
[ "$RPM_ARCH" = "noarch" ] && exit 0
# If we don't have the required executables, avoid changing anything.
gcj=${1:-/usr/bin/gcj}
[ ! -x "$gcj" -o ! -x "$gcj-dbtool" ] && exit 0
# Now get to work...
libdir="/usr/lib" # XXX need to sed this in or something
dbdir=`gcj-dbtool -p "$libdir"`.d/"$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION"
cflags="$RPM_OPT_FLAGS -fPIC -findirect-dispatch"
ldflags="-Wl,-Bsymbolic"
# XXX make it so you can override the list, for mx4j et al.
find "$RPM_BUILD_ROOT" -type f -name "*.?ar" | while read jar ; do
[ `head -c 2 "$jar"` != "PK" ] && continue
[ -d "$RPM_BUILD_ROOT/$libdir" ] || mkdir -p "$RPM_BUILD_ROOT/$libdir"
bnjar=`basename "$jar"`
lib="$libdir/lib$bnjar.so"
[ -f "$RPM_BUILD_ROOT/$lib" ] && continue
# XXX need splits to handle #158308
# (til then we can just compile big ones ourselves)
echo "$PS4$gcj -shared $cflags $ldflags -o $lib $jar"
$gcj -shared $cflags $ldflags -o "$RPM_BUILD_ROOT/$lib" "$jar"
[ -d "$RPM_BUILD_ROOT/$dbdir" ] || mkdir -p "$RPM_BUILD_ROOT/$dbdir"
db="$dbdir/$bnjar.db"
[ -f "$RPM_BUILD_ROOT/$db" ] && exit 1
$gcj-dbtool -n "$RPM_BUILD_ROOT/$db" 64
$gcj-dbtool -f "$RPM_BUILD_ROOT/$db" "$jar" "$lib"
done
# If using normal root, avoid changing anything.
[ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ] && exit 0
# If we are a noarch package, avoid changing anything.
[ "$RPM_ARCH" = "noarch" ] && exit 0
# If we don't have the required executables, avoid changing anything.
gcj=${1:-/usr/bin/gcj}
[ ! -x "$gcj" -o ! -x "$gcj-dbtool" ] && exit 0
# Now get to work...
libdir="/usr/lib" # XXX need to sed this in or something
dbdir=`gcj-dbtool -p "$libdir"`.d/"$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION"
cflags="$RPM_OPT_FLAGS -fPIC -findirect-dispatch"
ldflags="-Wl,-Bsymbolic"
# XXX make it so you can override the list, for mx4j et al.
find "$RPM_BUILD_ROOT" -type f -name "*.?ar" | while read jar ; do
[ `head -c 2 "$jar"` != "PK" ] && continue
[ -d "$RPM_BUILD_ROOT/$libdir" ] || mkdir -p "$RPM_BUILD_ROOT/$libdir"
bnjar=`basename "$jar"`
lib="$libdir/lib$bnjar.so"
[ -f "$RPM_BUILD_ROOT/$lib" ] && continue
# XXX need splits to handle #158308
# (til then we can just compile big ones ourselves)
echo "$PS4$gcj -shared $cflags $ldflags -o $lib $jar"
$gcj -shared $cflags $ldflags -o "$RPM_BUILD_ROOT/$lib" "$jar"
[ -d "$RPM_BUILD_ROOT/$dbdir" ] || mkdir -p "$RPM_BUILD_ROOT/$dbdir"
db="$dbdir/$bnjar.db"
[ -f "$RPM_BUILD_ROOT/$db" ] && exit 1
$gcj-dbtool -n "$RPM_BUILD_ROOT/$db" 64
$gcj-dbtool -f "$RPM_BUILD_ROOT/$db" "$jar" "$lib"
done