ipmctl/mkSafeC
Raymund Will ababa5f25f Accepting request 666964 from home:rwill:branches:hardware:nvdimm
- Update to v01.00.00.3382.  [FATE#326756, FATE#326917, FATE#326918]
  [bsc#1116404, bsc#1091108]
- Fix remaining unconditional calls to python/python2.  [bsc#1111020]
  (ipmctl-python3.patch)

OBS-URL: https://build.opensuse.org/request/show/666964
OBS-URL: https://build.opensuse.org/package/show/hardware:nvdimm/ipmctl?expand=0&rev=14
2019-01-18 11:50:09 +00:00

49 lines
1.2 KiB
Bash

#!/bin/bash
[ -r CMakeLists.txt ]
perl -pi.00 -e '
s<(\$\{CMAKE_THREAD_LIBS_INIT\})><PUBLIC $1>;
if (!$f) {
$f=1 if (s<(\$\{LIBSAFEC)(_LIBRARIES)><PRIVATE ${1}_LDFLAGS\} ${1}_STATIC${2}>);
}
s[(CMAKE_INSTALL_)DATAROOT(DIR\})/ipmctl][${1}SYSCONF${2}];
$_ .= " RENAME ipmctl\n" if (m{/logrotate\.d});
' CMakeLists.txt
#diff -u CMakeLists.txt{.00,} || sleep 2
perl -pi.00 -e 's{/usr/share/ipmctl}{/etc}' src/os/ini/ini.c
#diff -u src/os/ini/ini.c{.00,} || sleep 4
CONTRIB=$PWD/contrib
if [ -d $CONTRIB/include ]; then
cd $CONTRIB/src/libsafec*
LSC=${PWD##*/}
cp -p COPYING $CONTRIB/COPYING.$LSC
sleep 2
exit 0
fi
mkdir -p contrib/src/patches/libsafec
mv libsafec* contrib/src
[ -z "$1" ] || tar xvfC "$1" contrib/src/patches/libsafec
cd contrib/src/libsafec*
for p in ../patches/libsafec/*.patch; do
patch -p1 < $p
done
autoreconf -Wall --install
./configure --disable-shared \
--enable-static --enable-strmax=0x8000 \
--prefix=$CONTRIB \
CFLAGS="$RPM_OPT_FLAGS -fPIC -DHAVE_C99"
make $2
make install
LSC=${PWD##*/}
cp -p COPYING $CONTRIB/COPYING.$LSC
[ -d $CONTRIB/include/libsafec ] || exit 1
cd $CONTRIB/..
tar cf /tmp/libsafec-prebuild.tar contrib