You are not logged in.
I try to create package for MegaCloud. I try to convert them deb package to Arch.
I create PKGBUILD and install file. I maked the package and install its but the software not run.
$ megacloud
/usr/bin/megacloud:381: SyntaxWarning: name 'registryData' is used prior to global declaration
global registryData
/usr/bin/megacloud:382: SyntaxWarning: name 'AffilateID' is assigned to before global declaration
global AffilateID
/usr/bin/megacloud:383: SyntaxWarning: name 'SubAffilateID' is assigned to before global declaration
global SubAffilateID
Start MegaCloud
sh: /home/amiad/.megacloud/start: No such file or directory
PKGBUILD
# Contributor: Amiad Bareli <amiad@hatul.info>
pkgname=megacloud
pkgver=0.1.4.2906
pkgrel=1
pkgdesc="Simply drag and drop your files into MegaCloud to access them across every device!"
url="https://www.megacloud.com/"
license=(custom)
arch=('i686' 'x86_64')
depends=('lib32-qt4' 'python2')
makedepends=()
install=$pkgname.install
source=(http://d1.megacloud.com/download/installer/5ZEF/MegaCloud.deb)
sha1sums=('36bd89aa15b3253bec8f16b1683c89aed4f05792')
build(){
cd "${srcdir}"
tar -xf data.tar.gz
sed -i 's/#\!\/usr\/bin\/python/#\!\/usr\/bin\/python2/' usr/bin/megacloud
}
package() {
cd "${srcdir}"
install -dm 755 $pkgdir/usr/{lib/nautilus/{extensions-3.0,extensions-2.0},bin,share/{applications,megaclouddata,icons,nautilus/icons/hicolor/48x48/emblems,man/man1}}
install -Dm 644 usr/lib/nautilus/extensions-2.0/* $pkgdir/usr/lib/nautilus/extensions-2.0/
install -Dm 755 usr/bin/* $pkgdir/usr/bin/
install -Dm 644 usr/share/applications/* $pkgdir/usr/share/applications/
install -Dm 644 usr/share/megaclouddata/* $pkgdir/usr/share/megaclouddata/
install -Dm 644 usr/share/icons/* $pkgdir/usr/share/icons/
install -Dm 644 usr/share/nautilus/icons/hicolor/48x48/emblems/* $pkgdir//usr/share/nautilus/icons/hicolor/48x48/emblems/
install -Dm 644 usr/share/man/man1/* $pkgdir/usr/share/man/man1/
}
megacloud.install (copy from deb package files)
post_install() {
# postinst script for megacloud
#
# see: dh_installdeb(1)
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
echo "Post install script START"
ln -s /usr/lib/nautilus/extensions-2.0/libnautilus-megacloud.so /usr/lib/nautilus/extensions-3.0/
#Set nautilus data file permission
chmod 777 /usr/lib/nautilus/extensions-2.0
chmod 777 /usr/lib/nautilus/extensions-3.0
chmod 666 /usr/lib/nautilus/extensions-2.0/libnautilus-megacloud.so
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-error.icon
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-synced.icon
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-syncing.icon
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-error.png
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-photo.png
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-root.png
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-shared.png
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-synced.png
chmod 777 /usr/share/nautilus/icons/hicolor/48x48/emblems/megacloud-syncing.png
chmod 777 /usr/share/nautilus/icons/megacloud.png
#chmod 777 /usr/share/ugc
#Pop information dialog after install
UPDATENOTIFIERDIR=/var/lib/update-notifier/user.d
echo 'MegaCloud installation successfully completed! You can start MegaCloud from your applications menu.'
if [ -d $UPDATENOTIFIERDIR ] ; then
cat > $UPDATENOTIFIERDIR/megacloud-start-required <<MEGACLOUDEND
Name: MegaCloud Start Required
Priority: High
Command: megacloud -i
Terminal: False
DontShowAfterReboot: True
DisplayIf:
Description: Start MegaCloud to finish installation.
ButtonText: _Start MegaCloud
MEGACLOUDEND
# sometimes this doesn't happen:
touch /var/lib/update-notifier/dpkg-run-stamp
fi
currentVersion="0.1.4.2906"
affiliateID="0"
subAffiliateID=""
userAgent="MegaCloud"
#URL="https://stage.api-install.megacloud.com/mc/ConfirmInstall.php"
URL="https://api-install.megacloud.com/mc/ConfirmInstall.php"
echo "pre uninstall script start"
USER_NAME=$(echo $HOME | sed -s -e "s#/home/##g" )
echo $USER_NAME
#Read A & S from /usr/share/megaclouddata
FILE="/usr/share/megaclouddata/config"
if test -e "$FILE"; then
exec 0<$FILE
while read line
do
fieldname=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\1|')
if [ "$fieldname" == "a" ]; then
affiliateID=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\2|')
elif [ "$fieldname" == "s" ]; then
subAffiliateID=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\2|')
fi
done
fi
/usr/share/megaclouddata/PixelLogEmitter "$affiliateID" "$subAffiliateID" "$userAgent" "" "" 501 $URL
echo "Post install script END"
}
pre_remove() {
currentVersion="0.0.0.1"
affiliateID="0"
subAffiliateID=""
userAgent="MegaCloud"
#URL="https://stage.api-install.megacloud.com/mc/ConfirmInstall.php"
URL="https://api-install.megacloud.com/mc/ConfirmInstall.php"
echo "pre uninstall script start"
USER_NAME=$(echo $HOME | sed -s -e "s#/home/##g" )
echo $USER_NAME
#Read Version number from registry
FILE=$(echo "$HOME/.megacloud/registry")
if test -e "$FILE"; then
BAKIFS=$IFS
IFS=$(echo "")
exec 3<&0
exec 0<$FILE
while read line
do
#echo $line | sed -e '/a/,/:/p'
fieldname=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\1|')
if [[ "$fieldname" == "CurrentVersion" ]]; then
currentVersion=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\2|')
fi
done
exec 0<&3
IFS=$BAKIFS
fi
#Read A & S from /usr/bin/megaclouddata
FILE="/usr/share/megaclouddata/config"
if test -e "$FILE"; then
exec 0<$FILE
while read line
do
fieldname=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\1|')
if [[ "$fieldname" == "a" ]]; then
affiliateID=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\2|')
elif [[ "$fieldname" == "s" ]]; then
subAffiliateID=$(echo $line | sed -e 's|\([^:]*\):\([^:]*\).*|\2|')
fi
done
fi
#echo $currentVersion
#echo $affiliateID
#echo $subAffiliateID
#Send UnInstall Pixel
/usr/share/megaclouddata/PixelLogEmitter "$affiliateID" "$subAffiliateID" "$userAgent" "$currentVersion" "$currentVersion" 503 "$URL"
#/usr/bin/megaclouddata/PixelLogEmitter "$affiliateID" "$subAffiliateID" 503 5 "$affiliateID" -s "$subAffiliateID" -ov $currentVersion -v $currentVersion -m 0
#echo $pixelcmd
exit 0
}
post_remove() {
# Remove the Dropbox repository.
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license.
echo "post uninstall script start"
USER_NAME=$(echo $HOME | sed -s -e "s#/home/##g" )
echo $USER_NAME
if test -e "$HOME/.megacloud"; then
echo "Delete .megacloud"
rm -f -r $HOME/.megacloud
fi
#remove files under megaclouddata folder recursively
#data="/usr/share/megaclouddata"
#if test -d ${data}; then
#echo "Delete files under megaclouddata"
#rm -rf ${data}/*
#fi
}
I will happy if you help me to find the problem.
Offline
Maybe is too late, but i found a workarund to run Megacloud, first, you have to set the variablo to python2, and for the first start just run <i>megacloud -i</i> as normal user
Offline
thanks, I used copy.com now.
Offline