
chmod 755 ${PKG}/usr/lib64/jellyfin/bin/jellyfin

cat ${CWD}/restart.sh > ${PKG}${PREFIX}/lib64/jellyfin/restart.sh
chmod 755 ${PKG}${PREFIX}/lib64/jellyfin/restart.sh


mkdir -p ${PKG}${PREFIX}/bin
cat ${CWD}/jellyfin.sh > ${PKG}${PREFIX}/bin/jellyfin.sh
chmod 755 ${PKG}${PREFIX}/bin/jellyfin.sh

mkdir -p $PKG/etc/xdg/autostart 
cp $CWD/jellyfin.desktop $PKG/etc/xdg/autostart/jellyfin.desktop

rm -rf ${PKG}/lib
rm -rf ${PKG}/etc/sudoers.d
rm -rf ${PKG}/etc/systemd
rm -rf ${PKG}/etc/default
rm -rf ${PKG}/etc/init*

mkdir -p ${PKG}${PREFIX}/doc/${NAME}-${VERSION}
cp ${PKG}${PREFIX}/share/doc/jellyfin-server/copyright ${PKG}${PREFIX}/doc/${NAME}-${VERSION}
rm -rf ${PKG}${PREFIX}/share
