You are not logged in.
Pages: 1
when I learn to compile umtsmon, I find some export command in pkgbuild script
export QTDIR=/opt/qt
export PATH=/opt/qt/bin:$PATH
but, when I try "echo $PATH" in terminal I can't find /opt/qt/bin, what's wrong?
OS : Archlinux i686 » Kernel : 2.6.37-ARCH
Offline
Offline
And if you want to cd to an exported dir, I think you need to have
shopt -s cdable_vars
in your .bashrc.
Offline
thanks for reply bro.. but I just want to know.. why it's not added itself? it's export command not working in PKGBUILD?
OS : Archlinux i686 » Kernel : 2.6.37-ARCH
Offline
You have to source the file, not run it.
https://bbs.archlinux.org/viewtopic.php … 43#p814943
Offline
so.. makepkg -s don't execute thats script?
OS : Archlinux i686 » Kernel : 2.6.37-ARCH
Offline
so.. makepkg -s don't execute thats script?
This is executing:
./my_script
This is sourcing
. my_script
Offline
sorry Karol, I really don't understand about it.. and I want to know more..
# Contributor: János Illés <ijanos@gmail.com>
pkgname=umtsmon
pkgver=0.9
pkgrel=6
pkgdesc="A tool to manage your UMTS (3G) card/device (send sms, modify pin, monitor traffic)"
url="http://umtsmon.sourceforge.net/"
license="GPL"
arch=('i686' 'x86_64')
depends=('qt3' 'ppp' 'libusb')
optdepends=('gksu: umtsmon will complain if gksu is missing, but works fine after ignoring the error message'
'usb_modeswitch: devices with ZeroCD functionality may need this to get working'
'polymer: nice looking QT3 theme without KDE dependencies')
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.src.tar.gz)
md5sums=('2f9260d1fc69b230cf0035efa1a962f0')
build() {
export QTDIR=/opt/qt
export PATH=/opt/qt/bin:$PATH
cd $srcdir/$pkgname-$pkgver
sed -i '29i#include <sys/stat.h>\n' src/base/SerialPort.cpp
qmake || return 1
make all || return 1
lupdate umtsmon.pro ||return 1
lrelease umtsmon.pro ||return 1
install -m755 -D umtsmon $pkgdir/usr/sbin/umtsmon
mkdir -p $pkgdir/usr/share/umtsmon/translations/
cp i18n/*.qm $pkgdir/usr/share/umtsmon/translations/
install -m644 -D umtsmon.desktop $pkgdir/usr/share/applications/umtsmon.desktop
install -m644 -D images/128/umtsmon-128x128.png $pkgdir/usr/share/pixmaps/umtsmon-128x128.png
}
makepkg -s executing each line in PKGBUILD script, isn't it?
sorry about my english..
OS : Archlinux i686 » Kernel : 2.6.37-ARCH
Offline
Well, the shell is executing it, yes.
Offline
thanks for answer... but I'm still don't understand... I'm pure newbie in Linux... don't be angry if my question very stupid.
OS : Archlinux i686 » Kernel : 2.6.37-ARCH
Offline
Create a file, my_script :
#!/bin/bash
export QTDIR=/opt/qt
export PATH=/opt/qt/bin:$PATH
Run
chmod +x my_script
Put it in the directory with PKGBUILD.
Try this
build() {
. my_script
The rest of your PKGBUILD stays the same.
Offline
yep... thats make more understandable for me... thanks Karol... great solutions...
OS : Archlinux i686 » Kernel : 2.6.37-ARCH
Offline
Pages: 1