aboutsummaryrefslogtreecommitdiff
path: root/rpm/docker/build.sh
blob: 87a2bc921613d5d319de45315d0ee611362f972b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

#= .rpm builder

set -o errexit
set -o xtrace

# Move to source directory
pushd "${SOURCE_DIR}"

# Build DEB
if [[ ${ARCH} != $( uname -m ) ]]; then
    #export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
    export CONFIG_CROSS="-a ${ARCH}"
fi
#find . -iname 'jellyfin.spec'
#pwd
find . -maxdepth 4 -type d ! -ipath '*/node_modules/*' -exec ls -aldF --color=always {} +
mkdir -p ~/rpmbuild/RPMS ~/rpmbuild/SRPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS
tar -zcf ~/"rpmbuild/SOURCES/jellyfin-web-${JELLYFIN_VERSION}.tar.gz" jellyfin-web
tar -zcf ~/"rpmbuild/SOURCES/jellyfin-${JELLYFIN_VERSION}.tar.gz" jellyfin-server
cp -pf rpm/*.* ~/"rpmbuild/SOURCES/"
rpmbuild -ba rpm/jellyfin.spec --define="jversion ${JELLYFIN_VERSION}"

mkdir -p "${ARTIFACT_DIR}/"
mv ~/rpmbuild/RPMS/${ARCH}/*rpm ~/rpmbuild/SRPMS/*rpm "${ARTIFACT_DIR}/"

popd
bgstack15