30 lines
955 B
Executable File

#!/bin/bash -ex
# we should always set proper ownership before exiting, otherwise
# the created packages will have root:root ownership and we'll be unable
# to delete them from our host.
trap 'chown -R --reference /usr/bin/ /out/' EXIT
# the source directory is mounted read-only to prevent issues where the build
# could alter the source; we should copy it somewhere inside the container
cd /source/out
ls -alh
mkdir -p ${INSTALL_TOP}/lib/pEp
mkdir -p ${INSTALL_TOP}/include/pEp
mkdir -p ${INSTALL_TOP}/share
cp -ar lib/ ${INSTALL_TOP}/lib/.
cp -ar lib/pEp/libetpan* ${INSTALL_TOP}/lib/pEp/..
cp -ar include/pEp/* ${INSTALL_TOP}/include/pEp/.
cp -ar share/* ${INSTALL_TOP}/share/.
cd /out
#this would be the no-signature command line
fpm -t rpm -s dir \
-n ${PKG_NAME} \
--version ${PKG_VERSION} \
--description "${PKG_DESCRIPTION}" \
--depends ${PKG_DEPENDS} \