SHARE
TWEET

Untitled

a guest Apr 9th, 2013 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. EAPI=4
  3.  
  4. LANGS="ar de el es fr hi id it ja nl no pl pt ru th tr zh"
  5.  
  6. inherit eutils qt5
  7.  
  8. DESCRIPTION="Advanced file copying tool"
  9. HOMEPAGE="http://ultracopier.first-world.info/"
  10. SRC_URI="http://files.first-world.info/${PN}/${PV}/ultracopier-src-${PV}.tar.xz -> ${P}.tar.xz"
  11.  
  12. LICENSE="GPL-3"
  13. SLOT="0"
  14. KEYWORDS="~amd64"
  15. IUSE="debug"
  16. S=${WORKDIR}/${P}/src/
  17.  
  18. RDEPEND="x11-libs/qt-core:5
  19.         x11-libs/qt-gui:5"
  20. DEPEND="${RDEPEND}"
  21.  
  22. DOCSDIR="${S}/"
  23. DOCS="README"
  24.  
  25. src_prepare() {
  26.         find -name "informations.xml" -exec sed -i -r "s/<architecture>.*<\/architecture>/<architecture>linux-x86_64-pc<\/architecture>/g" {} \; > /dev/null 2>&1
  27.         find -name "informations.xml" -exec sed -i -r "s/<version>.*<\/version>/<version>${PV}<\/version>/g" {} \; > /dev/null 2>&1
  28.         find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_VERSION_PORTABLE/\/\/#define ULTRACOPIER_VERSION_PORTABLE/g" {} \; > /dev/null 2>&1
  29.         find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_VERSION_PORTABLEAPPS/\/\/#define ULTRACOPIER_VERSION_PORTABLEAPPS/g" {} \; > /dev/null 2>&1
  30.         if use debug ; then
  31.         then
  32.                 find -name "Variable.h" -exec sed -i "s/\/\/#define ULTRACOPIER_DEBUG/#define ULTRACOPIER_DEBUG/g" {} \; > /dev/null 2>&1
  33.                 find -name "Variable.h" -exec sed -i "s/\/\/#define ULTRACOPIER_PLUGIN_DEBUG/#define ULTRACOPIER_PLUGIN_DEBUG/g" {} \; > /dev/null 2>&1
  34.                 find -name "Variable.h" -exec sed -i "s/\/\/#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW/#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW/g" {} \; > /dev/null 2>&1
  35.         else
  36.                 find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_DEBUG/\/\/#define ULTRACOPIER_DEBUG/g" {} \; > /dev/null 2>&1
  37.                 find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_PLUGIN_DEBUG/\/\/#define ULTRACOPIER_PLUGIN_DEBUG/g" {} \; > /dev/null 2>&1
  38.                 find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW/\/\/#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW/g" {} \; > /dev/null 2>&1
  39.         fi
  40.         find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_PLUGIN_ALL_IN_ONE/\/\/#define ULTRACOPIER_PLUGIN_ALL_IN_ONE/g" {} \; > /dev/null 2>&1
  41.         find -name "Variable.h" -exec sed -i "s/\/\/#define ULTRACOPIER_VERSION_ULTIMATE/#define ULTRACOPIER_VERSION_ULTIMATE/g" {} \; > /dev/null 2>&1
  42.         eqmake4 "${S}"/ultracopier-core.pro
  43.         eqmake4 "${S}"/plugins/CopyEngine/Ultracopier/CopyEngine.pro
  44.         eqmake4 "${S}"/plugins/Listener/catchcopy-v0002/listener.pro
  45.         eqmake4 "${S}"/plugins/plugins/SessionLoader/KDE4/sessionLoader.pro
  46.         eqmake4 "${S}"/plugins/Themes/Oxygen/interface.pro
  47. }
  48.  
  49. src_compile() {
  50.         lrelease -nounfinished -compress -removeidentical -silent ultracopier-core.pro > /dev/null 2>&1 || die "Error when release the qm file"
  51.         if [ -f Makefile ] ; then
  52.                 emake
  53.         fi
  54.         cd "${S}"/plugins/CopyEngine/Ultracopier/
  55.         if [ -f Makefile ] ; then
  56.                 emake
  57.         fi
  58.         cd "${S}"/plugins/Listener/catchcopy-v0002/
  59.         if [ -f Makefile ] ; then
  60.                 emake
  61.         fi
  62.         cd "${S}"/plugins/plugins/SessionLoader/KDE4/
  63.         if [ -f Makefile ] ; then
  64.                 emake
  65.         fi
  66.         cd "${S}"/plugins/Themes/Oxygen/
  67.         if [ -f Makefile ] ; then
  68.                 emake
  69.         fi
  70. }
  71.  
  72. src_install() {
  73.         dobin ultracopier
  74.         newicon resources/ultracopier-128x128.png ultracopier.png
  75.         domenu resources/ultracopier.desktop
  76.        
  77.         insinto /usr/share/Ultracopier/CopyEngine/Ultracopier/
  78.         doins plugins/CopyEngine/Ultracopier/informations.xml
  79.         doins plugins/CopyEngine/Ultracopier/libcopyEngine.so
  80.         fperms 0755 /plugins/CopyEngine/Ultracopier/libcopyEngine.so
  81.  
  82.         insinto /usr/share/Ultracopier/Listener/catchcopy-v0002/
  83.         doins plugins/Listener/catchcopy-v0002/informations.xml
  84.         doins plugins/Listener/catchcopy-v0002/liblistener.so
  85.         fperms 0755 /plugins/Listener/catchcopy-v0002/liblistener.so
  86.  
  87.         insinto /usr/share/Ultracopier/SessionLoader/KDE4/
  88.         doins plugins/SessionLoader/KDE4/informations.xml
  89.         doins plugins/SessionLoader/KDE4/libsessionLoader.so
  90.         fperms 0755 /plugins/SessionLoader/KDE4/libsessionLoader.so
  91.  
  92.         insinto /usr/share/Ultracopier/Themes/Oxygen/
  93.         doins plugins/Themes/Oxygen/informations.xml
  94.         doins plugins/Themes/Oxygen/libinterface.so
  95.         fperms 0755 /plugins/Themes/Oxygen/libinterface.so
  96.  
  97.         lrelease -nounfinished -compress -removeidentical -silent ultracopier-core.pro > /dev/null 2>&1 || die "Error when release the qm file"
  98.         for project in `find plugins/ plugins-alternative/ -maxdepth 2 -type d`
  99.         do
  100.                 if [ -f ${project}/*.pro ]
  101.                 then
  102.                         lrelease -nounfinished -compress -removeidentical -silent ${project}/*.pro > /dev/null 2>&1 || die "Error when release the qm file"
  103.                 fi
  104.         done
  105.         find -iname "*.ts" -exec rm {} \; > /dev/null 2>&1 || die "Error when remove the ts file"
  106.  
  107.         # Install translations
  108.         for Z in ${LANGS}; do
  109.                 if use linguas_${Z} ; then
  110.                         insinto /usr/share/Ultracopier/Languages/${Z}/
  111.                         doins -r plugins/Languages/${Z}/
  112.                         insinto /usr/share/Ultracopier/CopyEngine/Ultracopier/Languages/${Z}/
  113.                         doins -r plugins/CopyEngine/Ultracopier/Languages/${Z}/
  114.                         insinto /usr/share/Ultracopier/Themes/Oxygen/Languages/${Z}/
  115.                         doins -r plugins/Themes/Oxygen/Languages/${Z}/
  116.                 fi
  117.         done
  118. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top