aboutsummaryrefslogtreecommitdiff
path: root/rpm/docker/build.sh
blob: 4dd676ee0bb555825f3ef2df157cd9727a8ef0bc (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
29
30
31
32
#!/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
# FIXME: that node_modules is probably contents of the jellyfin-npm.tar.xz
mkdir -p ~/rpmbuild/RPMS ~/rpmbuild/SRPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS
tar -zcf ~/"rpmbuild/SOURCES/jellyfin-web-${JELLYFIN_VERSION}.tar.gz" jellyfin-web
ln -s ~/"rpmbuild/SOURCES/jellyfin-web-${JELLYFIN_VERSION}.tar.gz" . || :
tar -zcf ~/"rpmbuild/SOURCES/jellyfin-${JELLYFIN_VERSION}.tar.gz" jellyfin-server
ln -s ~/"rpmbuild/SOURCES/jellyfin-${JELLYFIN_VERSION}.tar.gz" . || :
cp -pf rpm/*.* ~/"rpmbuild/SOURCES/"
find . -maxdepth 4 -type d ! -ipath '*/node_modules/*' -exec ls -aldF --color=always {} +
sh -x rpm/jellyfin-offline.sh
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