[aur-general] Fwd: Re: Linux Manga Downloader

Jorge Barroso jorge.barroso.11 at gmail.com
Tue May 8 17:14:05 EDT 2012


No problem.

>*From the man page: "sed - stream editor for filtering and transforming text".*Basically it's a non-interactive text editor.
sed 's|usr/local|usr|' -i "${pkgdir}/usr/bin"/* changes every
occurrence of "usr/local" with "usr" in all the files in
${pkgdir}/usr/bin. But only the first one in every line (I think). I
assume it's needed because you app by default expects to be in
/usr/local/bin while you install it in /usr/bin.

I may be wrong, but I think that the last echos will not be executed.
If you want to display some messages after installation, use an
install script.

On a side note, please don't break the threads by. Also, most email
clients can hide the quoted text, so no problem there either.
And on another side note, sorry for top posting in my previous reply,
I didn't notice it.

--Chris Sakalis

--------------------------------------------------------------------------------

Well these should go to the install file. Create a file called
ldm.install and set install=ldm.install in the PKGBUILD. Take a lookt at
file /usr/share/pacman/proto.install, you should only needd the
post_install function and put those echos in there :D
PKGBUILD is used to build a pkgname-version-pkgrel.pkg.tar.xz package
that you install with pacman. Pacman then reads the .install file from
that package and does what it tells it to do and copies the files to the
system. Most people are lilely to just install this from the AUR, so
they would see that message. But in case say someone sends the redy
built pacman package to a frind the friend would not saee that message,
but if it is in install file he will.


You are also missing the md5sums variable from the package. Run
makepkg -g in the directoey where the PKGBUILD is and copy the output
into the PKGBUILD.
(I myself have an alias setup fot that. "makesum='makepkg -g >>
PKGBUILD'" this gives me a command makesum that automatically appends
the md5sums to the end of the PKGBUILD)

Sed can do a lot of things. Basicly it reads text, does something to it
and slips the mangled text out. 's|original|new|' for example would
replaces every single word original with the word new.

I think you should read these:
https://wiki.archlinux.org/index.php/Pkgbuildhttps://wiki.archlinux.org/index.php/Makepkghttps://wiki.archlinux.org/index.php/AUR
And here is a werty comprehensive guide to
sed.http://www.grymoire.com/Unix/Sed.html
I myself can only use the replace command 's' XD

--------------------------------------------------------------------------------

Ok, I got it!! And it works making sudo pacman -U etc.
This is the final PKGBUILD:
# Maintainer: Jorge <jorge.barroso.11 at gmail.com>
pkgname=linux-manga-downloader
pkgver=('0.2.0.1')
_rawversion=('0.2.0.1')
pkgrel='5Beta'
pkgdesc="A manga downloader for many English and Spanish websites."
arch=('any')
url="http://code.google.com/p/${pkgname}/"
license=('GPL3')
depends=('libnotify' 'gtkdialog' 'wget' 'lynx' 'zenity')
install='LMD.install'
md5sums=('a91ccb44877c30e3193292a3ee9cc942')
source=(http://${pkgname}.googlecode.com/files/${pkgname}_0.2.0.1-5Beta_all.deb)

package() {
cd "${srcdir}"

tar xf data.tar.gz
mkdir -p "${pkgdir}/usr/"
cp -r "${srcdir}/./usr/local/bin" "${pkgdir}/usr/bin"
cp -r "${srcdir}/./usr/share" "${pkgdir}/usr/share"

chmod +x "${pkgdir}/usr/bin"/*
sed 's|usr/local|usr|' -i "${pkgdir}/usr/bin"/*
sed 's|usr/local|usr|' -i "${pkgdir}/usr/share/applications/LMD.desktop"
}

# vim:set ts=2 sw=2 et:

Thanks guys, thanks you two, this is my first package ever, even I
tried sometimes on fedora and ubuntu, this is the first package I
submit *-* so I'm like...
I don't know, so so happy of course :D your my heroes :D XD I'm just
18 and that was an important achievement. Well, I'll submit it right
now :D
I've uploaded the package here for to see it if you want->
https://rapidshare.com/files/3651110504/linux-manga-downloader-0.2.0.1-5Beta-any.pkg.tar.xz
If you want to try it, see what I did, etc. Any feedback will be well received

Thanks you both you guys :D!!


More information about the aur-general mailing list