* setup /usr/bin/filebot via postinst/prerem scripts

This commit is contained in:
Reinhard Pointner 2012-06-17 10:43:18 +00:00
parent c7e001c033
commit 8e821d9a17
5 changed files with 35 additions and 32 deletions

View File

@ -141,7 +141,7 @@
<zipfileset src="${dir.lib}/jgat-custom.jar"> <zipfileset src="${dir.lib}/jgat-custom.jar">
<include name="com/dmurph/tracking/**" /> <include name="com/dmurph/tracking/**" />
</zipfileset> </zipfileset>
<zipfileset src="${dir.lib}/sevenzipjbinding.jar"> <zipfileset src="${dir.lib}/sevenzipjbinding.jar">
<include name="net/sf/sevenzipjbinding/**" /> <include name="net/sf/sevenzipjbinding/**" />
</zipfileset> </zipfileset>
@ -187,45 +187,40 @@
</target> </target>
<target name="deb-arch"> <target name="deb-arch">
<deb todir="${dir.dist}" package="filebot" version="${version}" architecture="${arch}" section="misc" depends="default-jre-headless" recommends="default-jre" suggests="openjdk-7-jre" homepage="http://filebot.sourceforge.net" priority="optional"> <deb todir="${dir.dist}" package="filebot" version="${version}" architecture="${arch}" section="misc" depends="default-jre-headless" recommends="default-jre" suggests="openjdk-7-jre" homepage="http://filebot.sourceforge.net" priority="optional" postinst="${dir.installer}/deb/postinst.sh" prerm="${dir.installer}/deb/prerem.sh">
<maintainer name="Reinhard Pointner" email="rednoah@users.sourceforge.net" /> <maintainer name="Reinhard Pointner" email="rednoah@users.sourceforge.net" />
<description synopsis="The ultimate tv renamer / subtitle downloader / sfv validator">FileBot is the ultimate tool for renaming your tv shows and anime, downloading subtitles from various sources or just simple file verification.</description> <description synopsis="The ultimate tv renamer / subtitle downloader / sfv validator">FileBot is the ultimate tool for renaming your tv shows and anime, downloading subtitles from various sources or just simple file verification.</description>
<tarfileset fullpath="usr/share/filebot/FileBot.jar" file="${path.fatjar}" /> <tarfileset fullpath="usr/share/filebot/FileBot.jar" file="${path.fatjar}" />
<tarfileset prefix="usr/share/filebot" dir="${dir.lib}/native/linux-${arch}" includes="*.so" /> <tarfileset prefix="usr/share/filebot" dir="${dir.lib}/native/linux-${arch}" includes="*.so" />
<tarfileset prefix="usr/share/filebot" file="${dir.installer}/icons/icon48.png" /> <tarfileset prefix="usr/share/filebot" file="${dir.installer}/icons/icon48.png" />
<tarfileset prefix="usr/share/filebot/bin" file="${dir.installer}/deb/filebot.sh" filemode="755" /> <tarfileset prefix="usr/share/filebot/bin" file="${dir.installer}/deb/filebot.sh" filemode="755" />
<tarfileset fullpath="usr/bin/filebot" file="${dir.installer}/deb/filebot.sh" filemode="755" />
<tarfileset prefix="usr/share/applications" file="${dir.installer}/deb/FileBot.desktop" /> <tarfileset prefix="usr/share/applications" file="${dir.installer}/deb/FileBot.desktop" />
</deb> </deb>
</target> </target>
<target name="ipkg" depends="fatjar" description="Build ipkg package for ARM"> <target name="ipkg" depends="fatjar" description="Build ipkg package for ARM and ATOM">
<taskdef resource="ant_deb_task.properties" classpath="${dir.lib}/build/ant-deb.jar" /> <taskdef resource="ant_deb_task.properties" classpath="${dir.lib}/build/ant-deb.jar" />
<deb todir="${dir.dist}" package="filebot" version="${version}" architecture="arm" section="misc" homepage="http://filebot.sourceforge.net" priority="optional"> <antcall target="ipkg-arch">
<maintainer name="Reinhard Pointner" email="rednoah@users.sourceforge.net" /> <param name="arch" value="arm" />
<description synopsis="The ultimate tv renamer / subtitle downloader / sfv validator">FileBot is the ultimate tool for renaming your tv shows and anime, downloading subtitles from various sources or just simple file verification.</description> </antcall>
<tarfileset fullpath="usr/share/filebot/FileBot.jar" file="${path.fatjar}" /> <antcall target="ipkg-arch">
<tarfileset prefix="usr/share/filebot" dir="${dir.lib}/native/linux-arm" includes="*.so" /> <param name="arch" value="i686" />
<tarfileset prefix="usr/share/filebot" file="${dir.installer}/icons/icon48.png" /> </antcall>
<tarfileset prefix="usr/share/filebot/bin" file="${dir.installer}/ipkg/filebot.sh" filemode="755" />
<tarfileset fullpath="usr/bin/filebot" file="${dir.installer}/ipkg/filebot.sh" filemode="755" />
</deb>
<move tofile="${dir.dist}/filebot_2.62_arm.ipk" file="${dir.dist}/filebot_2.62_arm.deb" overwrite="true" />
<deb todir="${dir.dist}" package="filebot" version="${version}" architecture="i686" section="misc" homepage="http://filebot.sourceforge.net" priority="optional">
<maintainer name="Reinhard Pointner" email="rednoah@users.sourceforge.net" />
<description synopsis="The ultimate tv renamer / subtitle downloader / sfv validator">FileBot is the ultimate tool for renaming your tv shows and anime, downloading subtitles from various sources or just simple file verification.</description>
<tarfileset fullpath="usr/share/filebot/FileBot.jar" file="${path.fatjar}" />
<tarfileset prefix="usr/share/filebot" dir="${dir.lib}/native/linux-i386" includes="*.so" />
<tarfileset prefix="usr/share/filebot" file="${dir.installer}/icons/icon48.png" />
<tarfileset prefix="usr/share/filebot/bin" file="${dir.installer}/ipkg/filebot.sh" filemode="755" />
<tarfileset fullpath="usr/bin/filebot" file="${dir.installer}/ipkg/filebot.sh" filemode="755" />
</deb>
<move tofile="${dir.dist}/filebot_2.62_i686.ipk" file="${dir.dist}/filebot_2.62_i686.deb" overwrite="true" />
</target> </target>
<target name="ipkg-arch">
<deb todir="${dir.dist}" package="filebot" version="${version}" architecture="${arch}" section="misc" homepage="http://filebot.sourceforge.net" priority="optional" postinst="${dir.installer}/ipkg/postinst.sh" prerm="${dir.installer}/ipkg/prerem.sh">
<maintainer name="Reinhard Pointner" email="rednoah@users.sourceforge.net" />
<description synopsis="The ultimate tv renamer / subtitle downloader / sfv validator">FileBot is the ultimate tool for renaming your tv shows and anime, downloading subtitles from various sources or just simple file verification.</description>
<tarfileset fullpath="usr/share/filebot/FileBot.jar" file="${path.fatjar}" />
<tarfileset prefix="usr/share/filebot" dir="${dir.lib}/native/linux-${arch}" includes="*.so" />
<tarfileset prefix="usr/share/filebot/bin" file="${dir.installer}/ipkg/filebot.sh" filemode="755" />
</deb>
<move tofile="${dir.dist}/filebot_${version}_${arch}.ipk" file="${dir.dist}/filebot_${version}_${arch}.deb" overwrite="true" />
</target>
<target name="msi" depends="fatjar" description="Build Windows Installer for x86 and x64"> <target name="msi" depends="fatjar" description="Build Windows Installer for x86 and x64">
<antcall target="msi-arch"> <antcall target="msi-arch">
@ -243,7 +238,7 @@
<property name="lib7z_binding" location="${dir.lib}/native/win32-${arch}/7-Zip-JBinding.dll" /> <property name="lib7z_binding" location="${dir.lib}/native/win32-${arch}/7-Zip-JBinding.dll" />
<property name="libgcc_path" location="${dir.lib}/native/win32-${arch}/${libgcc_name}" /> <property name="libgcc_path" location="${dir.lib}/native/win32-${arch}/${libgcc_name}" />
<property name="installer" location="${dir.dist}/FileBot_${version}_${arch}.msi" /> <property name="installer" location="${dir.dist}/FileBot_${version}_${arch}.msi" />
<exec executable="candle.exe" dir="${dir.installer}/msi" failonerror="true"> <exec executable="candle.exe" dir="${dir.installer}/msi" failonerror="true">
<arg line="filebot-wix.xml -out ${dir.dist}/msi.wixobj -arch ${arch} -dreleaseversion=${version} -dfatjar=${path.fatjar} -dmediainfo=${mediainfo} -dlib7z_binding=${lib7z_binding} -dlibgcc_name=${libgcc_name} -dlibgcc_path=${libgcc_path}" /> <arg line="filebot-wix.xml -out ${dir.dist}/msi.wixobj -arch ${arch} -dreleaseversion=${version} -dfatjar=${path.fatjar} -dmediainfo=${mediainfo} -dlib7z_binding=${lib7z_binding} -dlibgcc_name=${libgcc_name} -dlibgcc_path=${libgcc_path}" />
</exec> </exec>
@ -384,7 +379,7 @@
<exclude name="**/*.java" /> <exclude name="**/*.java" />
</fileset> </fileset>
</copy> </copy>
<!-- update application properties --> <!-- update application properties -->
<replace dir="${dir.build}" encoding="utf-8" summary="yes"> <replace dir="${dir.build}" encoding="utf-8" summary="yes">
<include name="**/*.properties" /> <include name="**/*.properties" />
@ -489,7 +484,7 @@
<scp todir="${sf.user}:${sf.password}@${deploy.release}" trust="yes" verbose="true"> <scp todir="${sf.user}:${sf.password}@${deploy.release}" trust="yes" verbose="true">
<fileset dir="${dir.dist}/release" includes="**/*.deb" /> <fileset dir="${dir.dist}/release" includes="**/*.deb" />
</scp> </scp>
<!-- deploy ipkg packages --> <!-- deploy ipkg packages -->
<sleep seconds="5" /> <sleep seconds="5" />
<scp todir="${sf.user}:${sf.password}@${deploy.release}" trust="yes" verbose="true"> <scp todir="${sf.user}:${sf.password}@${deploy.release}" trust="yes" verbose="true">

View File

@ -0,0 +1,2 @@
#!/bin/sh
ln -s /usr/share/filebot/bin/filebot.sh /usr/bin/filebot

2
installer/deb/prerem.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
rm /usr/bin/filebot

View File

@ -0,0 +1,2 @@
#!/bin/sh
ln -s /usr/share/filebot/bin/filebot.sh /usr/bin/filebot

2
installer/ipkg/prerem.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
rm /usr/bin/filebot