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

Chris Sakalis chrissakalis at gmail.com
Tue May 8 15:18:22 EDT 2012


On Tue, May 8, 2012 at 10:03 PM, Jorge Barroso
<jorge.barroso.11 at gmail.com> wrote:
> Thanks to both you two Jesse and Chris, I won't copy the both replies here
> to make the message shorter. I did at first what Chris told me about the
> install option, I liked it, but, at least BY NOW, I'll use the chmod/copy
> combination, because I'm not new, but I know less things than that I
> thought, and I would like to learn little by little. Respect to Jesse's
> message, I did it with your help, correcting some little details and I
> think now it's correct :D I would like a little introduccion to "sed"
> option, because I didn't know it, not a lot, but, as "cp" copies a
> directory on another one, what makes "sed"? :) Thanks for your help, and
> this is my PKGBUILD by now, hope it's correct ;)
>
> # Maintainer: Your Name <youremail at domain.com>
> pkgname=linux-manga-downloader
> pkgver=0.2.0.1-5Beta
> _rawversion=0.2.0.1
> pkgrel=1
> 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')
> source=
> http://code.google.com/${pkgname}/downloads/detail?name=${pkgname}_${pkgver}_all.deb
> )
>
> package() {
> cd "${srcdir}"
>
> tar -xfzv 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/LDM.desktop"
> }
>
> echo "Now, been in your HOME directory, run: lmd -reconf and then run the
> program ;) enjoy it."
> echo "In some Websites, when downloading, the program says there was an
> error with the last page of the chapter, don't worry, coding mistake, that
> page was downloaded successfully"
>
> # vim:set ts=2 sw=2 et:
>
>
> The two "echo" at the end are to add two comments that I considered
> important things to know :)
> So... what do you thing about the PKGBUILD now? :)

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


More information about the aur-general mailing list