tested on mageia 5 :)
This commit is contained in:
@@ -255,8 +255,8 @@ enabled=1
|
|||||||
gpgcheck=0
|
gpgcheck=0
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
INSTALL_TOOL=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum))
|
INSTALL_TOOL=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper install -y) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf install -y) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum install -y) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo urpmi --auto))
|
||||||
docker exec ${DOCKER_ID} ${INSTALL_TOOL} install -y rpm-build automake libtool subversion gcc-c++ pkgconfig
|
docker exec ${DOCKER_ID} ${INSTALL_TOOL} rpm-build automake libtool subversion gcc-c++ pkgconfig
|
||||||
docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -c
|
docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -c
|
||||||
TGZFILE=$(grep PACKAGE_STRING= configure | sed "s, ,-,g;s,PACKAGE_STRING=',,g;s,',.tar.gz,g")
|
TGZFILE=$(grep PACKAGE_STRING= configure | sed "s, ,-,g;s,PACKAGE_STRING=',,g;s,',.tar.gz,g")
|
||||||
touch $TGZFILE
|
touch $TGZFILE
|
||||||
|
@@ -10,8 +10,13 @@ BuildRequires: rpm-build, subversion, automake, autoconf, doxygen, java-openjdk,
|
|||||||
BuildRequires: graphviz
|
BuildRequires: graphviz
|
||||||
%endif
|
%endif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version}
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} || 0%{?mageia}
|
||||||
BuildRequires: which, pkgconfig, cppunit-devel, redhat-lsb, libtool-ltdl-devel
|
BuildRequires: which, pkgconfig, cppunit-devel
|
||||||
|
%if 0%{?mageia}
|
||||||
|
BuildRequires: lsb-release, libltdl-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: redhat-lsb, libtool-ltdl-devel
|
||||||
|
%endif
|
||||||
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
|
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
|
||||||
BuildRequires: mscgen
|
BuildRequires: mscgen
|
||||||
%endif
|
%endif
|
||||||
|
@@ -10,19 +10,19 @@
|
|||||||
## 1 2 3 4 5 6 7 8
|
## 1 2 3 4 5 6 7 8
|
||||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||||
|
|
||||||
INSTALL_TOOL=${INSTALL_TOOL:-$((test -x /usr/bin/zypper && echo zypper) || (test -x /usr/bin/dnf && echo dnf) || (test -x /usr/bin/yum && echo yum))}
|
INSTALL_TOOL=${INSTALL_TOOL:-$((test -x /usr/bin/zypper && echo zypper install -y) || (test -x /usr/bin/dnf && echo dnf install -y) || (test -x /usr/bin/yum && echo yum install -y) || (test -x /usr/sbin/urpmi && echo urpmi --auto))}
|
||||||
SCHROOTNAME="$1"
|
SCHROOTNAME="$1"
|
||||||
PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
|
PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac)
|
||||||
|
|
||||||
if test -n "${SCHROOTNAME}"; then
|
if test -n "${SCHROOTNAME}"; then
|
||||||
FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
|
FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
|
||||||
if test -n "${FILES}"; then
|
if test -n "${FILES}"; then
|
||||||
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y ${FILES}
|
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} ${FILES}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
|
FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
|
||||||
if test -n "${FILES}"; then
|
if test -n "${FILES}"; then
|
||||||
${INSTALL_TOOL} install -y ${FILES}
|
${INSTALL_TOOL} ${FILES}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user