It is currently Mon May 20, 2013 2:40 am

All times are UTC




Post new topic Reply to topic  [ 277 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16, 17, 18, 19  Next
Author Message
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Sat Jun 07, 2008 9:31 pm 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
It's already done, the variable is sourcetemplate, E.g.:
Code:
sourcetemplate=http://users.zenwalk.org/user-accounts/pnboy/$pkgname/$pkgver/


I actually forget about the ZENBUILD, I'll add it in a couple of minutes, no version change will happen :)

EDIT: added, the link of the ZENBUILD and the build-$pkgname.sh :)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Sat Jun 07, 2008 9:41 pm 

Ah, thanks!

*cough* 54.1 *cough* ;D


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Sun Jun 08, 2008 8:04 pm 

The buildscript in the src file ends up with a $pkgname.sh filename instead of build-$pkgname.sh filename. I think we can keep that out though, the ZENBUILD is the important one, maybe keep that only?


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Mon Jun 09, 2008 7:21 pm 
Community Packager
Community Packager
User avatar

Joined: Sat Aug 18, 2007 11:32 pm
Posts: 371
Location: Sicily - Angle N/E
i ask you how to do, when a package has this form:
dvd-slideshow-0.8.0-1.tar.gz
in pkgname i can't to put - or _ idem in pkgver

_________________
Jabber: b4sh@jabber.org


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Mon Jun 09, 2008 7:27 pm 

You can have 0.8.0.1


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Mon Jun 09, 2008 7:34 pm 
Community Packager
Community Packager
User avatar

Joined: Sat Aug 18, 2007 11:32 pm
Posts: 371
Location: Sicily - Angle N/E
and in pkgname can i to use dvdslideshow ?

_________________
Jabber: b4sh@jabber.org


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Mon Jun 09, 2008 7:44 pm 

pkgname can be dvd-slideshow, no problems with "-" there.


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 7:29 am 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
A patch to take of those not clean url in source files, keep in mind that those should contain quotation marks("), example:
Quote:
source=("http://www.aquamaniac.de/sites/download/download.php?package=02&release=01&file=01&dummy=libchipcard-4.0.0.tar.gz")


Code:
--- /usr/bin/buildpkg.orig      2008-06-12 07:43:24.000000000 +0100
+++ /usr/bin/buildpkg   2008-06-12 08:09:19.000000000 +0100
@@ -165,11 +165,12 @@

 #source sanity
 for SOURCES in "${source[@]}"; do
-       if [ ! -f "$(basename $SOURCES)" ]; then
+       file=$(basename $SOURCES | awk -F= '{print $NF}')
+       if [ ! -f "$file" ]; then
                protocol=$(echo $SOURCES | sed 's|:.*||')
                if [ "$protocol" = "http" -o "$protocol" = "https" -o "$protocol" = "ftp" ]; then
                        echo -e "\nDownloading $(basename $SOURCES)\n"
-                       wget $SOURCES
+                       wget $SOURCES -O $file
                        if [ ! "$?" == "0" ]; then
                                echo "Download failed"
                                exit 2
@@ -178,7 +179,7 @@
                        err "$SOURCES does not appear to be a url nor is it in the directory"
                fi
        else
-               echo "$(basename $SOURCES) found in current directory"
+               echo "$file found in current directory"
        fi
 done

@@ -421,10 +422,11 @@
        mkdir -p \$startdir/pkg/usr/src/\$pkgname-\$pkgver
        for SOURCES in \${source[@]}; do
                protocol=\$(echo \$SOURCES | sed 's|:.*||')
-               if [ ! -f "\$(basename \$SOURCES)" ]; then
+               file=\$(basename \$SOURCES | awk -F= '{print \$NF}')
+               if [ ! -f "\$file" ]; then
                        if [ "\$protocol" = "http" -o "\$protocol" = "https" -o "\$protocol" = "ftp" ]; then
                                echo -e "\nDownloading \$(basename \$SOURCES)\n"
-                               wget \$SOURCES
+                               wget \$SOURCES -O \$file
                                if [ ! "\$?" == "0" ]; then
                                        echo "Download failed"
                                        exit 2
@@ -434,7 +436,7 @@
                                exit 2
                        fi
                fi
-               cp -R \$(basename \$SOURCES) \$startdir/src
+               cp -R \$file \$startdir/src
                if ! [ "\$protocol" = "http" -o "\$protocol" = "https" -o "\$protocol" = "ftp" ]; then
                        cp -R \$startdir/\$(basename \$SOURCES) \$startdir/pkg/usr/src/\$pkgname-\$pkgver/
                fi
@@ -462,7 +464,7 @@
        cd \$startdir/src
        if [[ "\$(ls \$startdir/src)" ]]; then
                for FILES in \${source[@]}; do
-                       FILES="\$(basename \$FILES)"
+                       FILES="\$(basename \$FILES | awk -F= '{print \$NF}')"
                        file_type=\$(file -biz "\$FILES")
                        unset cmd
                        case "\$file_type" in
@@ -666,6 +668,9 @@
 EOVARIABLES

 grep -e "^_[a-zA-Z]*=[a-zA-Z]*" $startdir/ZENBUILD >> $startdir/build-$pkgname.sh
+for (( I=0; I < ${#source[@]} ; I++)); do
+        source[$I]="\"${source[$I]}\""
+done
 echo "source=(${source[@]})" >> $startdir/build-$pkgname.sh
 if [[ ! -z $sourcetemplate ]]; then
        if [ ${sourcetemplate: -1} == "/" ]; then


Disclaimer: Not fully tested ..


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 7:52 am 
Community Packager
Community Packager
User avatar

Joined: Sat Aug 18, 2007 11:32 pm
Posts: 371
Location: Sicily - Angle N/E
If you explain how i can apply this patch, i can to do some test (i haven't never done betatester).

_________________
Jabber: b4sh@jabber.org


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 8:03 am 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
copy and paste that code to a text file then:
cd /usr/bin
cp buildpkg buildpkg.bak
patch -Np0 -i path_to_the_created_text_file

and your done :)

THX :D


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 10:01 am 
Community Packager
Community Packager
User avatar

Joined: Sat Aug 18, 2007 11:32 pm
Posts: 371
Location: Sicily - Angle N/E
Code:
root[bin]# patch -Np0 -i nbuildpkg
patching file /usr/bin/buildpkg
patch: **** malformed patch at line 5: #source sanity

nbuildpkg is the new file with patch

_________________
Jabber: b4sh@jabber.org


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 10:45 am 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
Tonino wrote:
nbuildpkg is the new file with patch

sorry...my bad, make that patch -Np2 -i nbuildpkg


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 10:49 am 
Community Packager
Community Packager
User avatar

Joined: Sat Aug 18, 2007 11:32 pm
Posts: 371
Location: Sicily - Angle N/E
Code:
root[bin]# patch -Np2 -i nbuildpkg
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /usr/bin/buildpkg.orig      2008-06-12 07:43:24.000000000 +0100
|+++ /usr/bin/buildpkg   2008-06-12 08:09:19.000000000 +0100
--------------------------
File to patch:

D!!

_________________
Jabber: b4sh@jabber.org


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 1:18 pm 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
I can only assume that U don't have buildpkg installed?
"netpkg buildpkg" and restart the procedure :)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Jun 12, 2008 1:22 pm 
Community Packager
Community Packager
User avatar

Joined: Sat Aug 18, 2007 11:32 pm
Posts: 371
Location: Sicily - Angle N/E
Code:
tonino[~]$ whereis buildpkg
buildpkg: /usr/bin/buildpkg.bak /usr/bin/buildpkg /etc/buildpkg /usr/X11R6/bin/buildpkg.bak /usr/X11R6/bin/buildpkg /usr/X11/bin/buildpkg.bak /usr/X11/bin/buildpkg /usr/man/man8/buildpkg.8.gz /usr/man/cat8/buildpkg.8.bz2 /usr/share/man/man8/buildpkg.8.gz /usr/share/man/cat8/buildpkg.8.bz2 /usr/X11/man/man8/buildpkg.8.gz /usr/X11/man/cat8/buildpkg.8.bz2

I have installed buildpkg

_________________
Jabber: b4sh@jabber.org


 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 277 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16, 17, 18, 19  Next

All times are UTC


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
 
cron