Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Jul 2014, 09:24
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Buildpet
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [42 Posts]   Goto page: 1, 2, 3 Next
Author Message
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Sat 22 Sep 2012, 16:31    Post subject:  Buildpet
Subject description: compile apps with a few short commands
 

Hello,

When I first started compiling apps, I felt a sense of great satisfaction of being able to be able make pets from source files. But after some time, I realized that, with so many sources out there, it would be much, much more efficient to have some sort of automated build scripts do it all for you. Once you have created a build-script, then it should do everything for you, from downloading the source, configuring it, and converting into a pet.

So I started creating my own build-scripts which did the job, but then I discovered Iguleder's buildpkg system, which allowed for much smaller build-scripts, and also created smaller pets than my own system.

When I first tried it out, I was amazed, and delighted! Laughing Iguleder had done some fantastic work on this, and I could tell that he spent a lot of time creating the scripts. So the bulk of this project was already completed, thanks to Iguleder.

I took the buildpkg script and have adapted it so that it will create a suffix at the end of the pets. Also I have added a few bug fixes and some extra features. Newer scripts will have extra info sent to the /home/buildpet_info folder, or to /tmp/buildpet_info, if running without a savefile.

I also plan to add a grahical interface to this system, later on. After all this is complete, then I will periodically create and add build scripts to the repository.

I hope to end up with a large collection of build scripts so that eventually, a novice user will be able to load up any version of Puppy and be able to create pets from source files with a few clicks of the mouse .

Currently however, there is no GUI in place but using it from the terminal is not so difficult:

1) First you will need to install buildpet
2) load the devx sfs file. For drivers, the kernel-sources sfs must also be loaded
3) Open up a terminal emulator or exit to the console.
Example to build leafpad:
Code:
buildpet /usr/share/buildpet/document/leafpad.bp

or
Code:
cd /usr/share/buildpet/document
buildpet leafpad.bp


Done! That's it. The pets will end up in /root/my-pets. The only downside to this, is that for big apps, you will need a large savefile, since the sources will be extracted to the /root/my-pets folder. I may alter this in the future, but for now I just wanted to get it working right.
The only thing that the scripts will not do, is check for needed dependencies; But if a build fails to compile, there should be error messages that will tell you what dependencies are missing.

Download links are below.

Compilers
If you wish, you can post your configure options for apps that I haven't made scripts for. I can then test them, create new build-scripts and upload them to a repository.
buildpet-0.6.pet
Description  Early days buildpet with gui and Sept-12-2013 scripts
pet

 Download 
Filename  buildpet-0.6.pet 
Filesize  89.6 KB 
Downloaded  287 Time(s) 
buildpet-scripts-Sept-12-2013.tar.gz
Description  updated scripts; newer ones were created and tested on Slacko 5.5
gz

 Download 
Filename  buildpet-scripts-Sept-12-2013.tar.gz 
Filesize  84.52 KB 
Downloaded  293 Time(s) 
buildpet-sep-22-2012.tar.gz
Description  tarball of build-scripts collection
gz

 Download 
Filename  buildpet-sep-22-2012.tar.gz 
Filesize  55.42 KB 
Downloaded  562 Time(s) 

Last edited by Tman on Fri 20 Sep 2013, 02:05; edited 3 times in total
Back to top
View user's profile Send private message 
pemasu


Joined: 08 Jul 2009
Posts: 5463
Location: Finland

PostPosted: Sat 22 Sep 2012, 17:09    Post subject:  

Works. Thanks ! Very Happy
Back to top
View user's profile Send private message 
oldyeller


Joined: 15 Nov 2011
Posts: 772
Location: Mishawaka IN

PostPosted: Mon 24 Sep 2012, 13:29    Post subject:  

Hello Tman,
when I try and do tint2 or wbar I get permission denied.

Is there something else I need to do?


EDIT I saw what I did not do Laughing Laughing Laughing Laughing

I should have looked closer at the example you gave above.

This works really nice Thank you so much for this

Cheers
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2373
Location: UK

PostPosted: Fri 22 Mar 2013, 06:20    Post subject:  

I have been making updates to buildpet, including

- auto tar up the source dir of svn/git downloads, then remove the source dir when not needed
- allow to change package versions in the build script (can now download 'pkg-latest.tar.gz', which might unpack the dir 'pkg-0.x.x' - now it will still work fine, with the right stuff in the build script [see jwm build script])
-added ability to auto-integrate with Pkg (my cli pkg manager) if its installed
- updated info in pop up message when installed
- more verbose error reporting
- added build scripts for: jwm (always builds latest version), easytag, audacious, xcb_proto, xcb_util, pekwm, freeciv , others ...
- fixed some buildscripts (xpad, others), needed `wget --no-check-certificate`

to see all build scripts available to compile, type the following in the terminal:
Code:
find /usr/share/buildpet


A very small note for Akita users: cos of this,
Code:
pkg --compile-pkg jwm
pkg --install jwm
etc
will be all you need to compile and install stuff from source in the next Akita Smile
buildpet_nogui-0.5.pet
Description 
pet

 Download 
Filename  buildpet_nogui-0.5.pet 
Filesize  63.97 KB 
Downloaded  446 Time(s) 

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Sat 15 Jun 2013, 15:31    Post subject:  

sc0ttman wrote:
I have been making updates to buildpet

Thanks, and good work, Sc0ttman! Smile
Back to top
View user's profile Send private message 
simargl

Joined: 11 Feb 2013
Posts: 572

PostPosted: Sat 10 Aug 2013, 15:45    Post subject:  

.
_________________
The Arch Way

Last edited by simargl on Sun 01 Sep 2013, 11:29; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
gcmartin

Joined: 14 Oct 2005
Posts: 4111
Location: Earth

PostPosted: Sun 11 Aug 2013, 21:51    Post subject: Which PETs should I install.  

This appears to be a useful tool for one on my needs.

Which of the PETs is the most current for build scripts?

Thanks in advance

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3956
Location: Kiel,Germany

PostPosted: Sun 15 Sep 2013, 12:38    Post subject:  

To me it is a bit of a children 's toy :
The need for these configuration files to download makes it unusable for me .
Almost everywhere I would need to adjust Tman's or iguleder's or Barry's configure options and version numbers and and http://paths .

The functions in the .bp files are basically the same everywhere .

Almost all paths aren't double quoted if weird chars or spaces in file names occur .

I think searching at packages.debian.org and go to the homepage , download it there , click to open it with xarchive , open a terminal and run ./configure ; make; new2dir make install would be as fast with better control while downloading .

*
PRO Buildpet :
The code is clean and nice to read for someone that knows how this all works .
Back to top
View user's profile Send private message Visit poster's website 
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Wed 18 Sep 2013, 01:25    Post subject: Re: Which PETs should I install.  

gcmartin wrote:
Which of the PETs is the most current for buildcripts?

I have added a newer tar.gz file in the first post. This is the newest that I have; sorry I don't have a listed of what I added. Also, a lot of the scripts were edited to download newer versions.
BUT... a lot of the newer scripts might not work right away on older pups, due to dependency issues... meaning you might need to update the dependencies first.
The testbed for my older scripts were on Solidpup 5.1.1B, while the newer ones I made were used on Slacko-5.5 when I was making Tinted Slacko 5.5

If you download Sc0ttman's latest Akita, he has some new scripts of his own in /usr/share/buildpet folder

Karl Godt wrote:

I think searching at packages.debian.org and go to the homepage , download it there , click to open it with xarchive , open a terminal and run ./configure ; make; new2dir make install would be as fast with better control while downloading .

Perhaps it would be as fast, during the first time you do it, since the longest part is creating a proper .bp file.
But I think after you've got it configured the way you want, buildpet will be much faster AFTER the first time.. like when you want to build a new pet on a different version of Puppy

Also, a lot of newbies don't know how to "/.configure" and use new2dir... hell, I don't remember having used new2dir, myself.
Prior to buildpet, I started compiling with Amigo's src2pkg, but then I started doing it manually to learn that process a little better.
Buildpet is a system designed for noobs, and for Devs who compile the same apps for various Puppies/Puplets.

If you wanted to see buildpet in an even more user-friendly manner, check out Sc0ttman's Akita...he's got a gui for it in his package manager.

Karl Godt wrote:
To me it is a bit of a children 's toy :
Contrary to what some forum members think; I am not a good Bash scripter.. I am more of a Bash hacker. My bash skills are not at your level; I do what I can.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2373
Location: UK

PostPosted: Wed 18 Sep 2013, 02:49    Post subject:  

Karl Godt wrote:
everywhere I would need to adjust Tman's or iguleder's or Barry's configure options and version numbers and and http://paths .

Why? What adjustments need to be made for the downloads and compiles to work?

Or do you simply want to customise the buildscripts before compile? In which case, buildpet is not the issue.

..I am gonna come back to buildpet at some point and make it so that users can define the version they wanna compile direct from the command line...

And I don't see that it should be too hard to implement a dependency feature, where the deps are compiled first if not installed.. and i do agree that not using double quotes, just to make the code look nicer is not great, but URLs, package names and buildpet paths have no spaces..

Tman wrote:
If you wanted to see buildpet in an even more user-friendly manner, check out Sc0ttman's Akita...he's got a gui for it in his package manager.

Not yet, next version ... Will be out fairly soon..

Also, I get an error trying to download buildpet-sep-22-2012.tar.gz..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
simargl8

Joined: 06 Feb 2013
Posts: 65

PostPosted: Wed 18 Sep 2013, 08:09    Post subject:  

Tman,

buildpet is something Puppy Linux needs very much, for packaging efficiency,

and in 100% of other distributions using build script to make packages is a standard.

Too bad BKooler doesn't want to include it...
Back to top
View user's profile Send private message Visit poster's website 
anikin

Joined: 10 May 2012
Posts: 450

PostPosted: Wed 18 Sep 2013, 09:39    Post subject:  

simargl8 wrote:
Too bad BKooler doesn't want to include it...
Juvenile comments like this will hardly attract more users to your project.
They will rather alienate the remaining few, who are struggling to follow ... me thinks Sad
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3956
Location: Kiel,Germany

PostPosted: Wed 18 Sep 2013, 12:17    Post subject:  

That is a real heavy bunch of work to maintain 200+ separate package configuration files in BuildingBlock for example .

I could think of ONE huge file that contains VARIABLES ie

PATCH_NAME=patch
PATCH_VER=2.6.1
PATCH_REV=1
PATCH_DESC='Patch applying tool'
PATCH_CATEG=BuildingBlock
PATCH_DEPS=
PATCH_HOME=ftp.gnu.org/gnu
PATCH_CONFIGURE_OPTS=
PATCH_CFLAGS=
PATCH_Libs=
PATCH_LDFLAGS=

As a crude example I have hacked patch.bp , that includes code that should be somewhere else plus the download function to test for xz bz2 gz :

Code:
#!/bin/bash

exit_ (){ ## $1 wanted exitcode-# $* Additional Message
   case $1 in
   0) echo "Exit status is $1 .";;
   *) echo "Error $1 occurred :";;
   esac
   RV=$1;shift
   echo "$*"
   exit $RV
}

[ "$*" ] || exit_ 1 "Need Parameter (short pkg name ie abiword)."

echo $LINENO

PATCH_NAME=patch
PATCH_VER=2.6.1
PATCH_REV=1
PATCH_DESC='Patch applying tool'
PATCH_CATEG=BuildingBlock
PATCH_DEPS=
PATCH_HOME=ftp.gnu.org/gnu
PATCH_CONFIGURE_OPTS=
PATCH_CFLAGS=
PATCH_Libs=
PATCH_LDFLAGS=

echo $LINENO

grep -i "$1" "$0" >/tmp/buildpet."$1" || exit_ 1 "No such '$1' pkg for this program."

HOME_PAGE=`echo $(grep -m1 -i "^${1}_HOME" /tmp/buildpet."$1" | cut -f2 -d=)`
[ "$HOME_PAGE" ] || exit_ 2 "HOME_PAGE Variable Empty '$HOME_PAGE'."

NAME=`echo $(grep -m1 -i "^${1}_NAME" /tmp/buildpet."$1" | cut -f2 -d=)`

VER=`echo $(grep -m1 -i "^${1}_VER" /tmp/buildpet."$1" | cut -f2 -d=)`

echo $LINENO

download() {
   # download the sources
   for ext in xz bz2 gz ; do
   [ -f "${NAME}-${VER}.tar.$ext" ] && return 0
   wget --spider http://$HOME_PAGE/$NAME/${NAME}-${VER}.tar.$ext || SPIDER_ERR=$((SPIDER_ERR+1))
   [ $? = 0 ] && { wget http://$HOME_PAGE/$NAME/${NAME}-${VER}.tar.$ext && break; }
   done
   [ -f "${NAME}-${VER}.tar.$ext" ] && return 0
   [ "$SPIDER_ERR" = 3 ] && echo "http:://$HOME_PAGE/$NAME/${NAME}-${VER}.tar.* apparently Not Found on that Server."
   return 1
}
echo $LINENO
download;echo $?
echo $LINENO
Back to top
View user's profile Send private message Visit poster's website 
simargl8

Joined: 06 Feb 2013
Posts: 65

PostPosted: Wed 18 Sep 2013, 13:46    Post subject:  

Code:
name=geany
version=1.23
release=1
source=(http://download.geany.org/$name-$version.tar.bz2)

build () {
  cd $name-$version

  ./configure --prefix=/usr \
              --mandir=/usr/man \
              --enable-plugins

  make
  make DESTDIR=$PKG install
  rm -rf $PKG/usr/share/{doc,locale}
}


CRUX Linux Pkgfile http://crux.nu/ports/crux-3.0/contrib/geany/Pkgfile

Simple and beautiful. Very Happy
Back to top
View user's profile Send private message Visit poster's website 
gcmartin

Joined: 14 Oct 2005
Posts: 4111
Location: Earth

PostPosted: Wed 18 Sep 2013, 18:13    Post subject: Buildpet is it now v0.4 or v0.5?  

Hi @sc0ttman. Nice to see this tool and your ideas come together along with all the others, here.

What is the chance that an elementary version of this tool could become the foundation for a GUI for newbie use?

The effort and the terminal use could become a foundation for PET creations and an instructional for newbies.

Idea/not?

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [42 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1057s ][ Queries: 12 (0.0038s) ][ GZIP on ]