lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

making mandrake-rpm succeeded


From: Heikki Johannes Junes
Subject: making mandrake-rpm succeeded
Date: Mon, 16 Sep 2002 12:28:10 +0300 (EET DST)

I am glad to inform that the following script produced all the rpm -files
with the latest 1.6.3-CVS. I have gcc 2.96, guile 1.4, autotrace-0.30,
pktrace-1.0.3, t1utils-1.26 and texinfo-4.2. You need also gimp (Mandrake
8.2 has gimp 1.2.3).

There was one thing that was stange. After "make dist" as root permissions
of one file in "./out/"-directory are
  -rwx--x--x 2 root root lilypond-1.6.3.tar.gz*
Why not to have 755 permissions? I always change these permissions.

Maybe one should have some command like "make mandrake-rpm". The following
script makes all the tasks. It is rather long, since it generates all the
necessary files needed to compile the rpm, including rpm-user settings and
icons.

# File: "make_mandrake_rpm"
# 16th Aug 2002, Heikki Junes <heikki.junes at hut.fi>
#    * Produces mandrake rpm's after "make dist" has been run in LILYSRC.

if test $USER = "root"; then
  echo Do not make rpms as root! Log in as an user and rerun this script.;
  exit 1;
else
  echo Starting the script.;
fi

# Some variables

export LILYSRC=/home/lilypond/
export HOMEDIR=/home/$USER/
export ARCH=i586

# Make folders

mkdir -p ~/rpm/{BUILD,RPMS/$ARCH,RPMS/noarch,SOURCES,SRPMS,SPECS,tmp}

# Make .rpmrc

echo buildarchtranslate: i386: i586 > ~/.rpmrc
echo buildarchtranslate: i486: i586 >> ~/.rpmrc
echo buildarchtranslate: i586: i586 >> ~/.rpmrc
echo buildarchtranslate: i686: i586 >> ~/.rpmrc

# Make .rpmmacros

echo %_topdir               $HOMEDIR/rpm > ~/.rpmmacros
echo %_tmppath              $HOMEDIR/rpm/tmp >> ~/.rpmmacros
echo >> ~/.rpmmacros
echo %_signature            gpg >> ~/.rpmmacros
echo %_gpg_name             Mandrake Linux >> ~/.rpmmacros
echo %_gpg_path             ~/.gnupg >> ~/.rpmmacros
echo %distribution          Mandrake Linux >> ~/.rpmmacros
echo %vendor                MandrakeSoft >> ~/.rpmmacros

# Copy sources

cd ~/rpm/SOURCES/
cp $LILYSRC/out/lilypond-1.*.tar.gz ./

# Make icons

gimp -d -i -b '(list
 (set! lilyName "/home/lilypond/Documentation/pictures/lelieblond.xpm")
 (set! imagesize 16)
 (set! lilyNewName "lilypond-16x16.png")

 (set! image (car (file-xpm-load 1 lilyName lilyName)))
 (set! layer (car (gimp-image-get-active-layer image)))

 (gimp-image-resize image 836 836 (/ (- 836 582) 2) 0)
 (gimp-layer-resize layer 836 836 (/ (- 836 582) 2) 0)

 (gimp-by-color-select layer (list 0 0 0) 15 2 0 0 0 0)
 (gimp-selection-grow image 10)
 (gimp-bucket-fill layer 0 0 100 0 0 100 700)

 (gimp-selection-grow image 15)
 (gimp-selection-invert image)
 (gimp-rect-select image 0 0 345 150 0 0 0)
 (gimp-rect-select image 540 0 100 40 0 0 0)
 (gimp-rect-select image 0 400 242 208 0 0 0)
 (gimp-rect-select image 550 770 100 100 0 0 0)
 (gimp-edit-cut layer)

 (gimp-image-scale image imagesize imagesize)
 (file-png-save 1 image layer lilyNewName lilyNewName 0 6 1 0 0 1 1)
)' '(gimp-quit 0)'

gimp -d -i -b '(list
 (set! lilyName "/home/lilypond/Documentation/pictures/lelieblond.xpm")
 (set! imagesize 32)
 (set! lilyNewName "lilypond-32x32.png")

 (set! image (car (file-xpm-load 1 lilyName lilyName)))
 (set! layer (car (gimp-image-get-active-layer image)))

 (gimp-image-resize image 836 836 (/ (- 836 582) 2) 0)
 (gimp-layer-resize layer 836 836 (/ (- 836 582) 2) 0)

 (gimp-by-color-select layer (list 0 0 0) 15 2 0 0 0 0)
 (gimp-selection-grow image 10)
 (gimp-bucket-fill layer 0 0 100 0 0 100 700)

 (gimp-selection-grow image 15)
 (gimp-selection-invert image)
 (gimp-rect-select image 0 0 345 150 0 0 0)
 (gimp-rect-select image 540 0 100 40 0 0 0)
 (gimp-rect-select image 0 400 242 208 0 0 0)
 (gimp-rect-select image 550 770 100 100 0 0 0)
 (gimp-edit-cut layer)

 (gimp-image-scale image imagesize imagesize)
 (file-png-save 1 image layer lilyNewName lilyNewName 0 6 1 0 0 1 1)
)' '(gimp-quit 0)'

gimp -d -i -b '(list
 (set! lilyName "/home/lilypond/Documentation/pictures/lelieblond.xpm")
 (set! imagesize 48)
 (set! lilyNewName "lilypond-48x48.png")

 (set! image (car (file-xpm-load 1 lilyName lilyName)))
 (set! layer (car (gimp-image-get-active-layer image)))

 (gimp-image-resize image 836 836 (/ (- 836 582) 2) 0)
 (gimp-layer-resize layer 836 836 (/ (- 836 582) 2) 0)

 (gimp-by-color-select layer (list 0 0 0) 15 2 0 0 0 0)
 (gimp-selection-grow image 10)
 (gimp-bucket-fill layer 0 0 100 0 0 100 700)

 (gimp-selection-grow image 15)
 (gimp-selection-invert image)
 (gimp-rect-select image 0 0 345 150 0 0 0)
 (gimp-rect-select image 540 0 100 40 0 0 0)
 (gimp-rect-select image 0 400 242 208 0 0 0)
 (gimp-rect-select image 550 770 100 100 0 0 0)
 (gimp-edit-cut layer)

 (gimp-image-scale image imagesize imagesize)
 (file-png-save 1 image layer lilyNewName lilyNewName 0 6 1 0 0 1 1)
)' '(gimp-quit 0)'

tar cjvf lilypond-16x16.png.tar.bz2 lilypond-16x16.png
tar cjvf lilypond-32x32.png.tar.bz2 lilypond-32x32.png
tar cjvf lilypond-48x48.png.tar.bz2 lilypond-48x48.png

# Copy specs

cd ~/rpm/SPECS/
cp $LILYSRC/make/out/lilypond.mandrake.spec ./

# Build all rpm-packages at the same time, in background:
#
#        source-rpm: ~/rpm/SRPMS/lilypond.version.src.rpm
#        binary-rpm: ~/rpm/SRPMS/lilypond.version.rpm
# documentation-rpm: ~/rpm/SRPMS/lilypond-documentation.version.src.rpm

cd ~/rpm/SPECS/
echo rpm -ba ./lilypond.mandrake.spec > build_all_rpms
chmod 755 ./build_all_rpms

echo Press C-c to prevent compiling.
read -t 5

echo Compiling with nohup. Follow the log with "tail --follow nohup.out".

rm -f nohup.out
nohup ./build_all_rpms &

---
      Heikki Junes





reply via email to

[Prev in Thread] Current Thread [Next in Thread]