FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux User Repository

 
 
LinkBack Thread Tools
 
Old 05-08-2012, 04:52 PM
Chris Sakalis
 
Default Fwd: Linux Manga Downloader

Hello,

first of all, is should be something like "cp zerochan
$pkgdir/usr/local/bin/zerochan". Otherwise the build will fail.
Second, I think install is better than cp in this occasion, since you
can set the permission bits while copying. For example install -m755
zerochan $pkgdir/usr/local/bin/zerochan

Also, all the copying should probably go in the package() function and
not in build().

If you want, take a look at this[1] very simple PKGBUILD of mine.

Just a few friendly pointers,
Chris Sakalis


[1] https://aur.archlinux.org/packages/gi/gimp-plugin-wavelet-sharpen/PKGBUILD

On Tue, May 8, 2012 at 7:16 PM, Jorge Barroso
<jorge.barroso.11@gmail.com> wrote:
> Thanks Jesse I've already installed it on my PC and it works, so I've
> started making the PKGBUILD with your help and the steps I did. I've wrote
> all the information, and by now that's what I have:
>
> # Maintainer: Jorge <jorge.barroso.11@gmail.com>
>
> pkgname=linux-manga-downloader
> pkgver=0.2.0.1-5
> pkgrel=1
> pkgdesc="A manga downloader for linux, it allows fownloads from many
> English and Spanish websites"
> arch=('any')
> url="http://code.google.com/p/linux-manga-downloader/"
> license=('GPL3')
> depends=('libnotify' 'gtkdialog' 'wget' 'lynx' 'zenity')
> install=
> source=($pkgname-$pkgver.tar.gz)
>
>
> * * * * * * * --Well, about the build, I'm not sure (0% sure) but I think
> it could be something like that:
>
>
> cd "$srcdir/$pkgname_$pkgver/usr/local/bin"
> chmod +x 4chan
> chmod +x animea
> chmod +x danboru
> chmod +x futahentai
> chmod +x ge-2
> chmod +x lmd
> chmod +x lmd-fu
> chmod +x mangafox
> chmod +x mangareader
> chmod +x mangashare
> chmod +x mcanime
> chmod +x pown
> chmod +x submanga
> chmod +x zerochan
>
> cp 4chan /usr/local/bin/4chan
> cp animea /usr/local/bin/animea
> cp danboru /usr/local/bin/danboru
> cp futahentai /usr/local/bin/futahentai
> cp ge-2 */usr/local/bin/ge-2
> cp lmd /usr/local/bin/lmd
> cp lmd-fu /usr/local/bin/lmd-fu
> cp mangafox /usr/local/bin/mangafox
> cp mangareader /usr/local/bin/mangareader
> cp mangashare /usr/local/bin/mangashare
> cp mcanime /usr/local/bin/mcanime
> cp pown /usr/local/bin/pown
> cp submanga /usr/local/bin/submanga
> cp zerochan /usr/local/bin/zerochan
>
> and well... the same with the /usr/share directories. I've although thought
> writing that on an install script, but then I don't know what to write on
> "build"
>
> I think that I shouldn't write directly /usr/local/bin, but I don't know
> the "$variable" name of the directories...
>
> Thanks again jesse, and hope someone helps me to finish with that first
> package
 
Old 05-08-2012, 05:42 PM
Jesse Juhani Jaara
 
Default Fwd: Linux Manga Downloader

ti, 2012-05-08 kello 18:16 +0200, Jorge Barroso kirjoitti:
>pkgver=0.2.0.1-5
If I'm not completely mistaken '-' is not allowed in the version string.
set the version to 0.2.0.1_5Beta. And then add another variable.
_rawversion=0.2.0.1-5
> pkgdesc="A manga downloader for linux, it allows fownloads from many
> English and Spanish websites"
the description could be shortened to this "Download manga from several
English and Spanish websites."
The description should be as short as possible, but still of course try
to distinct it from other same kind of apps.

> arch=('any')
> url="http://code.google.com/p/linux-manga-downloader/"
> license=('GPL3')
> depends=('libnotify' 'gtkdialog' 'wget' 'lynx' 'zenity')
You can just omit the install variable, you don't need instal file for
this package so no need for the install= variable ether.

> source=($pkgname-$pkgver.tar.gz)
This is plain wrong. This tells makepkg to include the source-files of
the application in the ArchLinux PKGBUILD source-package. This is wrong.
Instead you should provide full URL to the download file online.
So it should be
source=(http://${pkgabme}.googlecode.com/files/${pkgname}_
${_rawversion}_all.deb)

build() function is met only for the command needed to compile the
sourcecode into binary executable. Usually this includes commands
./configure --prefix=/usr
and
make
for c and c++ aplications.

package() funcktion in the other hand is used to copy the files into
their rightfull place, if the application comes with Makefile you use
command 'make DESTDIR="${pkgdir}" install' for this


> cd "$srcdir/$pkgname_$pkgver/usr/local/bin"
> chmod +x 4chan
......
> cp zerochan /usr/local/bin/zerochan
All that could be simplified into
---------------------------------------
1. cd "${srcdir}"
2. tar xf data.tar.gz
3. mkdir -p "${pkgdir}/usr/"
4. cp -r "${srcdir}/./usr/local/bin" "${pkgdir}/usr/bin"
5. cp -r "${srcdir}/./usr/share" "${pkgdir}/usr/share"
6.
7. chmod +x "${pkgdir}/usr/bin"/*
8. sed 's|usr/local|usr|' -i "${pkgdir}/usr/bin"/*
9. sed 's|usr/local|usr|' -i
"${pkgdir}/usr/share/applications/LDM.desktop"
---------------------------------------
Explanation:
1. cd into the directory where our extracted deb file is
2. extrackt the data file part of the deb archive
3. Make the directory /usr in directory ${pkgdir}
${pkgdir}== /the/directory/where/your/PKGBUILD_file_is/pkg
4. copy the bin directory to ${pkgdir}/usr/bin, this is important part.
You MUST never copy anyfiles to /usr or anytoher direcoty, without
putting ${pkgdir} in front of it. Othervice makepkg will try to copy
that file directly to the system, instead of putting it in a pacman
installable file. The -r after cp tell cp to copy the whole directory
5. Do the same for the share directory. Also notice that in line 4 we
copy the file to /usr/bin and not /usr/local/bin. This is becouse we
don't use the /usr/local directory in ArchLinux and so everythin
should go to /usr.
6. Just some randon empty line to make reading easyer. One between lines
1 and 2 would be nice too. Does not serve any bigger purpose.
7. Make sure every file in directory "${pkgdir}/usr/bin" is executable.
8. Make sure that we don't refer to the old ubuntu stule /usr/local/
directory anywhere, but instead use the Arch style /usr only.
9. Fix the desktop file to point into /usr instead of /usr/local

I think this should make everything clear (You still have to fix any
errors I might have made)
Also like Chris Shakalis said you could use the install command instead
of cp and chmod, but cp and chmod work as well too.
 
Old 05-08-2012, 09:14 PM
Jorge Barroso
 
Default Fwd: Linux Manga Downloader

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
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@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 your my heroes XD I'm just
18 and that was an important achievement. Well, I'll submit it right
now
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 !!
 
Old 05-08-2012, 09:30 PM
Jesse Juhani Jaara
 
Default Fwd: Linux Manga Downloader

ti, 2012-05-08 kello 23:14 +0200, Jorge Barroso kirjoitti:
> Ok, I got it!! And it works making sudo pacman -U etc.
> This is the final PKGBUILD:
> # Maintainer: Jorge <jorge.barroso.11@gmail.com>
> pkgname=linux-manga-downloader
> pkgver=('0.2.0.1')
> _rawversion=('0.2.0.1')
> pkgrel='5Beta'
pkgrel is kidn of like == the version of the PKGBUILD. You change it
when you change something in the PKGBUILD, like adding some patch or
enabling a new feature on the application. When a new version is
released by the application maker you revert it back to 1.
So
_rawversion=('0.2.0.1-5Beta')
pkgrel=1

> md5sums=('a91ccb44877c30e3193292a3ee9cc942')
> source=(http://${pkgname}.googlecode.com/files/${pkgname}_0.2.0.1-5Beta_all.deb)
and put in that _rawversion variable in there. It currently serves no
purpose, givit some or it might do some stupid, like cutting his wrists
Yeah, even shell script variables can use knife!

> I don't know, so so happy of course your my heroes XD I'm just
> 18 and that was an important achievement. Well, I'll submit it right
> now
You still have loads of time to upload your next 100 packages ^_^.

> 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
Instead of that redybuildt package the makepkg/pacman/arch
or what ever is te correct term package you should upload
the makepkg -S/--source generated source package. That would
be more usefull.

> Thanks you both you guys !!
Glad to be help. ^_^ Here have a *cookie* you've done great.


A small note about mails... as Chris alredy mentioned. Your mails work
well in gmail it seems. Atleast my Android phones regular gmail app
puts all of these under same thread, but my dekstop mail client gets
them as individual mails, breaking the thread, while not being seroius.
Something is wrong with our way of replying or gmail settings I think.
Also about quoting. Like Chris said most mail clients can hide the
quoted message without any problems but it stoll nice to just cut
the parts you need and write that few lines of text under them. Like I
do, I think this is the way found to be good commonly (Might be
mistaken).
 
Old 05-08-2012, 09:55 PM
Jorge Barroso
 
Default Fwd: Linux Manga Downloader

Glad to be help. ^_^ Here have a *cookie* you've done great.


A small note about mails... as Chris alredy mentioned. Your mails work
well in gmail it seems. Atleast my Android phones regular gmail app
puts all of these under same thread, but my dekstop mail client gets
them as individual mails, breaking the thread, while not being seroius.
Something is wrong with our way of replying or gmail settings I think.
Also about quoting. Like Chris said most mail clients can hide the
quoted message without any problems but it stoll nice to just cut
the parts you need and write that few lines of text under them. Like I
do, I think this is the way found to be good commonly (Might be
mistaken).


jaja alright, I'll take that cookie XD

I submitted the package and it can already be installed from aur.

Talking about the mails, I'm using the desktop version aswell, I don't know
how to make my messages to be tracted as an answer if that's what should
happen.
So I copy and paste the message I'm going to answer to, and then I write
the answer... I hope with that will be enough

Thanks again!! XD
 
Old 05-08-2012, 10:05 PM
Jesse Juhani Jaara
 
Default Fwd: Linux Manga Downloader

ti, 2012-05-08 kello 23:55 +0200, Jorge Barroso kirjoitti:
> I submitted the package and it can already be installed from aur.
You forgot to fix the pkgrel and _rawversion..... Please fix
those and reupload with pkgrel=2.

> Talking about the mails, I'm using the desktop version aswell
I take this that you mean the online mail.google.com interface.

> So I copy and paste the message I'm going to answer to, and then I write
> the answer... I hope with that will be enough
I'm sorry to say but it isn't. (still assuming you use the online
gmail interface) Cick the arrow point to left to reply propelly.
Using the copy-paste method really screws up every ones mailboxes.
http://ompldr.org/vZG85OQ <- that arrow
 
Old 05-08-2012, 10:24 PM
Jorge Barroso
 
Default Fwd: Linux Manga Downloader

>
> Message: 7
> Date: Wed, 09 May 2012 01:05:47 +0300
> From: Jesse Juhani Jaara <jesse.jaara@gmail.com>
> To: aur-general@archlinux.org
> Subject: Re: [aur-general] Fwd: Re: Linux Manga Downloader
> Message-ID: <1336514747.28432.66.camel@localhost.localdomain >
> Content-Type: text/plain; charset="utf-8"
>
> >I'm sorry to say but it isn't. (still assuming you use the online
> >gmail interface) Cick the arrow point to left to reply propelly.
> >Using the copy-paste method really screws up every ones mailboxes.
> >http://ompldr.org/vZG85OQ <http://ompldr.org/vZG85OQ> <- that arrow
>
-----------------------------------------------------------------------------------------------------------------------

Ok, I'm trying now with the method you have said I took the digest,
clicked on the arrow and answered your message. Sorry again, I was never
used a Mailing List and it's a little... "special" to use XD

Regards
 
Old 05-08-2012, 11:04 PM
Jesse Juhani Jaara
 
Default Fwd: Linux Manga Downloader

ke, 2012-05-09 kello 00:24 +0200, Jorge Barroso kirjoitti:
> Ok, I'm trying now with the method you have said I took the digest,
> clicked on the arrow and answered your message.
.... My mail client (Evolution) still isn't happy with this....

BUT1!!!! Fix the pkgrel, it should only contain numbers.
It is the version of the PKGBUILD file, and has nothing
to do with the application version. pkgver is there
for that.
 
Old 05-09-2012, 10:11 AM
Jorge Barroso
 
Default Fwd: Linux Manga Downloader

>.... My mail client (Evolution) still isn't happy with this....

>Fix the pkgrel, it should only contain numbers.
It is the version of the PKGBUILD file, and has nothing
to do with the application version. pkgver is there
for that.

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

Oups... so I don't know, maybe... could be because I don't receive single
mails? I receive a Digest with all the recent mails, and I erased all but
the mail I was going to answer... :S I got to say that on the aur-general
Archive http://mailman.archlinux.org/pipermail/aur-general/2012-May/ my
mails are mostly grouped by thread... so... I don't know... :S

I know that pkgrel is not to do that, but, could you help me then with
anything? pkgver should be "0.2.0.1-5Beta", but on pkgver, I can't write
more than "0.2", and if the proyect releases (for example) a new version
called 0.2.1.0, I shoul let it like 0.2 aswell... what can I do to write
the full version path?

Thanks and sorry for breaking messages... I'll look up how not to do that :S
 
Old 05-09-2012, 10:19 AM
Chris Sakalis
 
Default Fwd: Linux Manga Downloader

On Wed, May 9, 2012 at 1:11 PM, Jorge Barroso
<jorge.barroso.11@gmail.com> wrote:
>>.... My mail client (Evolution) still isn't happy with this....
>
>>Fix the pkgrel, it should only contain numbers.
> It is the version of the PKGBUILD file, and has nothing
> to do with the application version. pkgver is there
> for that.
>
> --------------------------------------------------------------------------------------------------------
>
> Oups... so I don't know, maybe... could be because I don't receive single
> mails? I receive a Digest with all the recent mails, and I erased all but
> the mail I was going to answer... :S I got to say that on the aur-general
> Archive http://mailman.archlinux.org/pipermail/aur-general/2012-May/ my
> mails are mostly grouped by thread... so... I don't know... :S
>
> I know that pkgrel is not to do that, but, could you help me then with
> anything? pkgver should be "0.2.0.1-5Beta", but on pkgver, I can't write
> more than "0.2", and if the proyect releases (for example) a new version
> called 0.2.1.0, I shoul let it like 0.2 aswell... what can I do to write
> the full version path?
>
> Thanks and sorry for breaking messages... I'll look up how not to do that :S

Actually, $pkgver can contain letters. So you can set it as
"0.2.0.1.5Beta" or "0.2.0.1Beta5" or something similar without the
dash. And then set the proper $pkgrel for your PKGBUILD.
 

Thread Tools




All times are GMT. The time now is 07:00 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org