mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 13:59:49 -04:00
Build RPM package
This commit is contained in:
parent
bcd179c36f
commit
987394a920
33
build.xml
33
build.xml
@ -662,6 +662,37 @@
|
||||
</target>
|
||||
|
||||
|
||||
<target name="rpm" depends="revision" description="Build RPM package">
|
||||
<property name="dir.staging" location="${dir.dist}/rpm" />
|
||||
|
||||
<copy-replace todir="${dir.staging}">
|
||||
<fileset dir="${dir.installer}/rpm" />
|
||||
</copy-replace>
|
||||
|
||||
<copy todir="${dir.staging}/usr/share/filebot/jar">
|
||||
<fileset dir="${dir.dist}/lib" includes="*.jar" />
|
||||
</copy>
|
||||
|
||||
<!-- use Debian package structure -->
|
||||
<copy-replace todir="${dir.staging}/usr/share">
|
||||
<fileset dir="${dir.installer}/deb/share" />
|
||||
</copy-replace>
|
||||
<copy todir="${dir.staging}/usr/share/icons/hicolor/scalable/apps">
|
||||
<fileset dir="${dir.installer}/icons" includes="filebot.svg" />
|
||||
</copy>
|
||||
|
||||
<!-- fix execute permissions -->
|
||||
<chmod verbose="yes" perm="+x">
|
||||
<fileset dir="${dir.staging}" includes="**/*.sh" />
|
||||
</chmod>
|
||||
|
||||
<exec executable="docker" failonerror="yes">
|
||||
<arg line="run -v ${dir.staging}:/src -v ${dir.staging}/build:/rpm --rm rednoah/rpm-build -bb filebot.spec" />
|
||||
</exec>
|
||||
<copy file="${dir.staging}/build/${package.name}_${application.version}-universal.rpm" tofile="${dir.dist}/${release}.rpm" />
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<target name="spk" depends="revision" description="Build Synology NAS package">
|
||||
<property name="dir.staging" location="${dir.dist}/spk" />
|
||||
@ -710,7 +741,7 @@
|
||||
</target>
|
||||
|
||||
|
||||
<target name="qpkg" depends="revision" description="Build QNAP NAS Package">
|
||||
<target name="qpkg" depends="revision" description="Build QNAP NAS package">
|
||||
<property name="dir.staging" location="${dir.dist}/qpkg" />
|
||||
<property name="dir.base" location="${dir.dist}/qpkg/shared" />
|
||||
|
||||
|
35
installer/rpm/filebot.spec
Normal file
35
installer/rpm/filebot.spec
Normal file
@ -0,0 +1,35 @@
|
||||
Name: @{package.name}
|
||||
Version: @{application.version}
|
||||
Release: universal
|
||||
Summary: @{package.synopsis}
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: java-1.8.0-openjdk
|
||||
Requires: java-1.8.0-openjdk-openjfx
|
||||
Requires: jna
|
||||
Requires: libmediainfo
|
||||
Requires: libchromaprint
|
||||
Requires: p7zip
|
||||
Requires: p7zip-plugins
|
||||
|
||||
|
||||
%description
|
||||
@{package.description}
|
||||
|
||||
|
||||
%install
|
||||
cp -rvf %{src}/usr %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
/*
|
||||
|
||||
|
||||
%post
|
||||
ln -sf /usr/share/filebot/bin/filebot.sh /usr/bin/filebot
|
||||
|
||||
|
||||
%postun
|
||||
rm -f /usr/bin/filebot
|
||||
|
13
installer/rpm/usr/share/filebot/bin/filebot.sh
Executable file
13
installer/rpm/usr/share/filebot/bin/filebot.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
FILEBOT_HOME="/usr/share/filebot"
|
||||
|
||||
if [ -z "$HOME" ]; then
|
||||
echo '$HOME must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# select application data folder
|
||||
APP_DATA="$HOME/.filebot"
|
||||
LIBRARY_PATH="/usr/lib64/jna"
|
||||
|
||||
java -Dapplication.deployment=rpm -Djna.boot.library.name=jnidispatch -Dnet.filebot.archive.extractor=ShellExecutables @{java.application.options} @{linux.application.options} @{linux.desktop.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"
|
Loading…
x
Reference in New Issue
Block a user