You are not logged in.

#1 2005-07-07 14:22:49

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

E17 buildscript

For those of you that are building your own e17 packages (from pkgbuilds) , I have come up with an extremely ( i am by all means not a great programmer, but I'll learn..some time)  simple script that builds all the packages (tell me if I missed any) and separes the pkgbuilds from the "finished ones"..

Just change the e17path to your liking and check so that all your directories match those in the script..

have fun and hope it helps someone else than myself  (but my guess is that the ones who has e17 repos  already made some script similar to this) 

I have only tested it on my computer with my locations and so on...but it should work...

UPDATE: New script, a little nicer script thanks to dibble

UPDATE2: Added an error check, and gensync

#!/bin/sh
###########################################################################
# This is a simple script to build e17 and some of the applications that  #
# are needed or great to have together with the script                    #
# Made by: CyberTron arch@linuxportalen.com               
# With some help from Dibblethewrecker
###########################################################################
echo "Creating directories, if the don't exist, otherwise I give an error"

#Change to your directories...
mkdir /home/cybertron/pkgbuilds/e17/packages
e17path=/home/cybertron/pkgbuilds/e17
mkdir $e17path/packages/e17-$(date +%d%m%y)
build=$e17path/packages/e17-$(date +%d%m%y)
echo "E17-cvs log" > $build/e17-$(date +%d%m%y).log 

#Needed Libs, all names are directories (+cvs) example: eet-cvs
libs="eet edb evas ecore embryo imlib2 edje epeg epsilon esmart
 emotion engrave ewl etox imlib2_loaders eeh"
echo "Building necessary libraries"

#The E17 programs
e17="entice entrance eclair e engage erss e_utils e_modules e17genmenu
 elicit    embrace enterminus epsilon equate evidence examine eclips elation
  expose envision express enotes erme"

# Some 3:rd party modules
modules="evolume ecalendar"      

for app in $libs ; do
   cd $e17path/$app-cvs
      makepkg -c || { echo 'Failure!!'; rm -r pkg src; exit 1; }
         mv *.pkg.tar.gz $build 
    echo "The building of $app-cvs was successful" >> $build/e17-$(date +%d%m%y).log
        done
echo "Building E17 programs"
for app in $e17 ; do
  cd $e17path/$app-cvs
      makepkg -c || { echo 'Failure!'; rm -r pkg src; exit 1; }
         mv *.pkg.tar.gz $build
    echo "The building of $app-cvs was successful" >> $build/e17-$(date +%d%m%y).log
        done 

for app in $modules ; do
  cd $e17path/$app
      makepkg -c || { echo 'Failure!!'; rm -r pkg src; exit 1; }
         mv *.pkg.tar.gz $build
    echo "The building of $app was successful" >> $build/e17-$(date +%d%m%y).log
        done 
        
echo "Done making e17-cvs" 
# Show list
cat $build/e17-$(date +%d%m%y).log
#Make a repository
gensync $e17path $build/e17-cvs.db.tar.gz
#copy all files to another directory
cp -R $build/* /home/repo/e17

http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#2 2005-07-07 15:07:42

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: E17 buildscript

you want to use a:

list="big list of apps"
for app in $list ; do
   cd $e17path/$app
   makepkg
   mv *.pkg.tar.gz $build
   rm -r src pkg filelist
done

Offline

#3 2005-07-07 15:15:53

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

oh, that is nice, will the order be correct then aswell?

EDIT: It seems as the order is correct aswell big_smile

Thanks  dibblethewrecker big_smile


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#4 2005-07-07 16:25:33

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

Are there any way of logging the activity in the terminal ? (ini the script)


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#5 2005-07-07 17:04:18

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: E17 buildscript

echo a done command after each iteration?

list="big list of apps"
for app in $list ; do
   cd $e17path/$app
   makepkg
   mv *.pkg.tar.gz $build
   rm -r src pkg filelist
  echo "Done building $app"
done

something like that?

Offline

#6 2005-07-07 17:53:22

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

well, almost,

i was thinking more of something like "package completed successfull"  in a log.txt   so that one can check if there has been any errors or other problems during the build ..

hmm...just thought of something, one could do something like

 echo "$app was successfull" > log.txt

would it work? don't know, will try it out now big_smile


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#7 2005-07-07 18:00:40

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: E17 buildscript

not quite

if you use a single > it will overwrite the whole file each time.

You need to create the file first maybe with a header like

echo "e17-cvs log" >log.txt

then use a >> instead of > later to append to the file

that's just one way tho smile

Offline

#8 2005-07-07 18:10:24

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

yeah, noticed that too big_smile

well, now it is a bit better anyways, it will atleast let one know which package failed even though it isn't the error itself..

updated the code above


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#9 2005-07-07 19:44:42

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: E17 buildscript

nice big_smile

Offline

#10 2005-07-19 12:00:41

bluesurfer
Member
From: Regensburg, Germany
Registered: 2004-08-29
Posts: 22

Re: E17 buildscript

very nice script, thank you!  smile

Offline

#11 2005-07-19 14:07:59

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: E17 buildscript

Hi,

useful script, I just wonder what would be the advantage of such a script over a directory of E* stuff and running makeworld over it?

-neri

Offline

#12 2005-07-19 20:06:03

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

mm..makeworld? what is that? something similar to makepkg I assume big_smile

well, I do get a directory with the latest package files, sorted by date and then all the pkgbuilds directories contain only the pkgbuilds (since the script erases all other data that aren't supposed to be there)


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#13 2005-07-19 20:10:30

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: E17 buildscript

CyberTron wrote:

mm..makeworld? what is that? something similar to makepkg I assume big_smile

Yes, but it builds entire trees (directories) at once. So what neri was getting at would be to put everything (directories for each package with a PKBUILD in it) in an e17 folder and run makeworld on that directory.

Offline

#14 2005-07-19 20:43:29

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: E17 buildscript

Ahem, yes; it comes with pacman, like makepkg. It features
-b  --  build dependencies
-i   --  install after build
-c  -- clean up build dir and things
So it is very similar to your script.
The issues behind makeworld is, that it forces you to be very carefully with the deps. Makeworld fails on wrong or incomplete deps very easily. The subdirs in abs of /extra/kde and /extra/xfce4 are capable to be build with makeworld, which safes much time for the maintainer. A word of warning: makeworld sources /etc/abs.conf so it is better if you place your PKGBUILDs und $ABSROOT

-neri

Offline

#15 2005-07-20 05:05:58

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

A thanks for the explanation big_smile , I will most certainly look into makeword big_smile


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#16 2005-10-24 10:16:53

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

Hi!

I am once again updating my script for the latest, and I would like to have a "error check", so the script should break if one package fails to build...

how would I do that?

I am having something like this in mind:

makepkg -c || return 1

or perhaps something like this:
makepkg -c || break


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#17 2005-10-24 10:59:40

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: E17 buildscript

create a function at the top that will handle clean exits.

error() {
      check for something and do something
      do this
      do that
       exit 1
}

then you can do makepkg -c || error and it will go to that function you made. Functions only execute when specificly called on.

Offline

#18 2005-10-24 12:33:41

CyberTron
Member
From: Gotland ,Sweden
Registered: 2005-03-17
Posts: 645
Website

Re: E17 buildscript

found an even simplier version:

makepkg -c || { echo 'Failure'; exit 1; }

seem to do what i want big_smile

thanks anyway


http://www.linuxportalen.com  -> Linux Help portal for Linux and ArchLinux (in swedish)

Dell Inspiron 8500
Kernel 2.6.14-archck1  (selfcompiled)
Enlightenment 17

Offline

#19 2006-01-13 15:22:01

Legout
Member
From: Wuerburg/germany
Registered: 2004-01-19
Posts: 292

Re: E17 buildscript

Hi CyberTron,

After long time using fvwm, i´ll have a look at e17 again.

Is this script still usable?

Offline

Board footer

Powered by FluxBB