--- a/Dockerfile.fedora-25-amd64 Sun Aug 27 04:05:40 2017 -0500
+++ b/Dockerfile.fedora-25-amd64 Tue Sep 26 22:09:49 2017 -0500
@@ -13,5 +13,8 @@
+ENV DISTRIBUTION=fedora \ COPY rpm/build.sh /build.sh
--- a/Dockerfile.fedora-26-amd64 Sun Aug 27 04:05:40 2017 -0500
+++ b/Dockerfile.fedora-26-amd64 Tue Sep 26 22:09:49 2017 -0500
@@ -13,5 +13,8 @@
+ENV DISTRIBUTION=fedora \ COPY rpm/build.sh /build.sh
--- a/rpm/build.sh Sun Aug 27 04:05:40 2017 -0500
+++ b/rpm/build.sh Tue Sep 26 22:09:49 2017 -0500
@@ -1,4 +1,4 @@
# Copyright (C) 2015-2016 Gary Kramlich <grim@reaperworld.com>
# This program is free software; you can redistribute it and/or modify
@@ -15,26 +15,22 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-trap "EC=$?; chown -R ${UID}:${GID} /artifacts; exit \${EC}" INT QUIT TERM EXIT
+BUILD_TRIPLET=${DISTRIBUTION}-${VERSION}-${ARCH}
+ARTIFACTS_DIR=${CONVEY_WORKSPACE}/${BUILD_TRIPLET} +mkdir -p ${ARTIFACTS_DIR} -# fig out or build number
BUILD_NUMBER="${BUILD_NUMBER:-0}"
-BUILD_NUMBER="${BUILD_NUMBER}~$(hg id -i)"
+BUILD_VERSION="${BUILD_NUMBER}~$(hg id -i)" -# we need to generate the spec file so we need to run the cmake configure
-# and then remove CMakeCache.txt to make rpm build run
+# we need to generate the spec file so we need to run a meson +meson /tmp/${BUILD_TRIPLET}
+# now that we have our rpm spec file we can do an rpmbuild - -D "_rpmdir /artifacts/" \
- -D "build_number ${BUILD_NUMBER}" \
-find -name "*-junit.xml" -exec cp {} /artifacts/ \;
+ -D "_rpmdir ${ARTIFACTS_DIR}" \ + -D "_builddir ${CONVEY_WORKSPACE}" \ + -D "build_number ${BUILD_VERSION}" \ + /tmp/${BUILD_TRIPLET}/packaging/gplugin.spec