Buildpet

discuss compiling applications for Puppy
Message
Author
simargl8

#21 Post by simargl8 »

Tried buildpet-0.6 and for a test successfully built nano pet package in alphaos, system without pet package manager and any of other pet building tools.

Some problems to report:
- sh: line 51: defaulttexteditor: command not found
To edit buildscript instead of defaulttexteditor, you could use EDITOR environment variable, to be compatible with more than just puppy systems

- when buildpetui is started it shows this

Code: Select all

[root@alphaos Downloads]# buildpetui
/usr/share/buildpet/buildingblock/zlib.bp: line 2: usage:: command not found
/usr/share/buildpet/buildingblock/zlib.bp: line 3: configure: command not found
/usr/share/buildpet/buildingblock/zlib.bp: line 4: [--static]: command not found
/usr/share/buildpet/buildingblock/zlib.bp: line 5: [--includedir=INCLUDEDIR]: command not found
- other window that shows package building progress doesn't scroll automatically

simargl8

#22 Post by simargl8 »

This thing needs to get more attention, if I made those scripts I'd start thread under Puppy projects, and add github or mercurial repository, so others could contribute. A bit more simplification of the build script, improved gui and this could be standard way of making packages for Puppy Linux. Then one more thing is to add information about system where pet package is built, so everyone would know where it will work.

simargl8

#23 Post by simargl8 »

Noticed this on Arch forum...
ahcaliskan wrote:Cheflex is a package manager written in Bash. It is designed to be as
simple as possible. I like the simplicity of makepkg and it inspired me a lot.
.....................
https://bbs.archlinux.org/viewtopic.php?id=162727
http://www.selflex.org/cheflex/

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#24 Post by Tman »

hi simargl,

Your points are duly noted. I think I will leave the gui building to sc0ttman and his superior skills with gtkdialog. ( if that's okay with you sc0ttman? ).

I think for now, I will just keep this project in this thread, since it's easier to maintain a higher place on the post list in the Compiling section than in the Puppy Projects section. As for github.. mabye at a later time, when I find the motivation to set it a up ( I've haven't registered for an account there yet ).

Thanks for the links to cheflex. The concept is similiar to buildpet. Our scripts cannot be so simplified becuase we need to create pet packages after the installation, but I will take a look at the code and see what usefull parts I can transfer to /usr/bin/buildpet and /usr/share/builpet/buildpet.profile.

Please note that I am juggling other Puppy projects, as well as non-Linux related things in my life, so be patient with me, if the progress is not going as fast as you would like.

simargl8

#25 Post by simargl8 »

I'm not too much interested in buildpet, simply because I use my alphaos system with pacman
package manager, only I'm sure scripts you're making are essential part of any Linux system,
and also Puppy Linux, so users if competent enough to help you should really do that.

note this all please duly or whatever.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#26 Post by anikin »

Hi Tman,
Many thanks to you for the scripts, they do work!
I have setup my own cflags and ran a few test builds. The first one was Geany, I've had two versions of it actually - the stock one and the latest. Both compiled OK, except that I can't make them as small as Barry's. Then I ran jwm.bp, all went well - flags, compile options, the only insignificant glitch is that there's no "jwm" in the final pet package. I say insignificant, because I get the same result if I compile it manually as "new2dir make install." Don't know, maybe it gets cut off as result of strip? If I do just "make install" manually, it does install itself. Can you please, have a look at this particular script? Something's wrong with it. The install path points to usr/local/bin, making it usr/bin doesn't change the outcome. One thing I'd like to have in the scripts is the final output as a directory structure, not a pet. Will you consider such an option?
And here's a tiny spelling wrinkle, that needs to be corrected in pinstall.sh,
change this:
"A many 'build scripts' are already included in /usr/share/buildpet/.
You can write you own and add them there as well."
to:
"Many 'build scripts' are already included in /usr/share/buildpet/.
You can write your own and add them there as well."

Thank you again and everyone who has contributed to this great effort.

.

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#27 Post by Tman »

simargl,
Duly noted :P (teasing)
By the way, I tested Alpha OS. It's nice, and it appears we have similiar taste preferences in Desktop appearances. Pekwm looks pretty good as well, but I don't know if it has something similar to obconf.

anikan,
Which version of Puppy did you try to compile JWM in? The reason why I am asking, is becuase, right after reading your post I compiled JWM with buildpet on Pemasu's upup Raring 3.9.9 (which I plan to make a derivative on), and it appears to be fine.. my pet contains /usr/bin/jwm.

As for having buildpet building to a directory structure, you are in luck... buildpet already does that. However those directory structures get erased once the pets are built. To keep those directory structures, edit /usr/bin/buildpet and add find the line near the end of the script that says the following:

Code: Select all

rm -rf $PKG_FILE_NAME
add a # symbol to the start of that line, and you're set.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#28 Post by anikin »

Tested on Barry's Raring-5694, forgot to mention that.
However, I have the same result here on pemasu's Raring, usr/bin is empty :(

Code: Select all

make[1]: Leaving directory `/root/my-pets/tmp.OmPIHFgmAe/jwm-868/po'
install -d -m 0755 /root/my-pets/jwm-868-raring/etc/xdg/templates
install -m 644 example.jwmrc /root/my-pets/jwm-868-raring/etc/xdg/templates/system.jwmrc
install -d -m 0755 /root/my-pets/jwm-868-raring/usr/share/man/man1
install -m 644 jwm.1 /root/my-pets/jwm-868-raring/usr/share/man/man1/jwm.1
mv: cannot stat ‘/root/my-pets/jwm-868-raring/usr/local/bin/jwm’: No such file or directory
rmdir: failed to remove ‘/root/my-pets/jwm-868-raring/usr/local/bin’: No such file or directory
rmdir: failed to remove ‘/root/my-pets/jwm-868-raring/usr/local’: No such file or directory
Stripping
system.jwmrc
Splitting
man -> jwm_DOC-868-raring
Creating package(s):
PKG_FILE_NAME=jwm-868-raring
jwm-868-raring
        2236        2192  98% jwm-868-raring.pet
        2236        2192  98%
PKG_FILE_NAME=jwm_DEV-868-raring
PKG_FILE_NAME=jwm_DOC-868-raring
jwm_DOC-868-raring
        8516        8242  96% jwm_DOC-868-raring.pet
        8516        8242  96%
PKG_FILE_NAME=jwm_NLS-868-raring
If successful, the pets should be in /root/my-pets
#

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#29 Post by Tman »

Anikin,

try replacing /usr/share/buildpet/desktop/jwm.bp with the following code and let me know what happens..

Code: Select all

#!/bin/sh

PKG_NAME="jwm"
PKG_VER="current"
PKG_REV="1"
PKG_DESC="window manager"
PKG_CAT="Desktop"
PKG_DEPS=""

download() {
	# download the sources
	if [ ! -f $PKG_NAME-$PKG_VER.tar.bz2 ]
	then
		wget --no-check-certificate http://joewing.net/projects/jwm/snapshots/$PKG_NAME-$PKG_VER.tar.bz2
		[ $? -ne 0 ] && return 1
	fi
	
	return 0
}

build() {
	# extract the sources
	tar -xjvf $PKG_NAME-$PKG_VER.tar.bz2
	[ $? -ne 0 ] && return 1
	
	#get the actual version number, from the folder that has been unpacked
	PKG_VER="`find -name "${PKG_NAME}-*" -type d | cut -f2 -d'-'`"
	export PKG_VER

	cd $PKG_NAME-$PKG_VER

	# configure the package
	./configure $BASE_CONFIGURE_ARGS --disable-debug
	[ $? -ne 0 ] && return 1

	# build the package
	make -j $BUILD_THREADS
	[ $? -ne 0 ] && return 1

	return 0
}

package() {	
	# install the package
	make DESTDIR=$INSTALL_DIR install
	[ $? -ne 0 ] && return 1
	
	#overwrite current jwm, if exists
	if [ "`which jwm`" != "" ];then
		JWMPATH="`which jwm`"
		JWMPATH="`dirname $JWMPATH`"
		echo "JWM PATH="$JWMPATH
		mkdir -p $INSTALL_DIR/$JWMPATH
		cp $INSTALL_DIR/usr/local/bin/jwm $INSTALL_DIR/$JWMPATH/jwm
		rm -rf $INSTALL_DIR/usr/local
	fi
	
	#create pinstall file
	echo "#!/bin/sh
echo 'jwm' > etc/windowmanager
exec usr/bin/jwm_menu_create &

TEXT=\"JWM Installer

JWM Homepage: http://joewing.net/

JWM's config files are in the ~/.jwm directory. 

JWM will start next time you restart the X server (see below)...

1. Go to 'Menu>Shutdown>Restart X' and JWM will load.

2. If that fails, go to 'Menu>Shutdown>Exit to Prompt', then type 'xwin jwm' and hit ENTER.
   
NOTE: To read this later, see ${HOME}/jwm-tips.txt 
\"
Xdialog --title \"JWM Installer\" --msgbox \"\$TEXT\" 0 0 
echo \"\$TEXT\" > ~/jwm-tips.txt" > $INSTALL_DIR/pinstall.sh
	chmod +x $INSTALL_DIR/pinstall.sh
	[ $? -ne 0 ] && return 1

	return 0
}
Thanks for testing and feedback.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#30 Post by anikin »

Still no joy, everything gets created except jwm itself.

Code: Select all

Creating package(s):
PKG_FILE_NAME=jwm-868-raring
jwm-868-raring
       10401       10074  96% jwm-868-raring.pet
       10401       10074  96%
PKG_FILE_NAME=jwm_DEV-868-raring
PKG_FILE_NAME=jwm_DOC-868-raring
PKG_FILE_NAME=jwm_NLS-868-raring
If successful, the pets should be in /root/my-pets
#
This is what I added to the new script

Code: Select all

./configure $BASE_CONFIGURE_ARGS \
	--prefix=/usr \
	--sysconfdir=/etc/xdg/templates \
	--localstatedir=/var \
	--disable-debug \
	--disable-icons \
	--disable-nls \
	--disable-fribidi \
	--disable-shape \
	--disable-xinerama \
	--disable-xmu
	[ $? -ne 0 ] && return 1
	
and also changed this to show 2: PKG_REV="2"

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#31 Post by anikin »

Hi Tman,

Done it.
Must have been a fault in the source. It's version 869 now, and the script worked on it with flying colors. The only other thing I did differently this time, was the sequence of actions. Loaded devx first and then installed buildpet (pupmode 5 here, compiling in RAM). Great tool, it can/should reshape the way this community interacts. Instead of posting/downloading pets, one can have a script that will compile him a perfect app/proggram. Predefine "march=native" cflag, and the user will have the fastest, neatest code compiled exactly for his and only his processor. As for GUI, I'm against it for two reasons. We all will be better off if devs' time is spent on things that matter. Secondly, we noobs can learn a lot more if/when pushed to see what's going on under the hood.

Thank you.
Attachments
success.jpeg
(13.82 KiB) Downloaded 1417 times

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#32 Post by Tman »

I find it very puzzling that the modified script still gave you errors, whereas it work okay for me. But at least it works for you now. When I gave you advice about, modifying /usr/bin/buildpet to keep the directory structures, I tried it myself will the Jwm build, and it would give me problems after the second time I tried to compile it.
So my advice now, is allow the directory structures to be deleted... in other words, keep it the way it was before.
If you really want to see the directory structure inside a pet, you can use the rox right-click option to "extract pet", or you can try my alternative: pet2dir_ROXrightclick-1.1.pet
anikin wrote:As for GUI, I'm against it for two reasons. We all will be better off if devs' time is spent on things that matter. Secondly, we noobs can learn a lot more if/when pushed to see what's going on under the hood.
My opinion is; first try the gui if you don't know what you are doing.
When you want to learn, then read the scripts and try to compile manually. After you understand how to compile and build pets, make your own scripts and use the terminal to debug.
After your script is finalized, use the gui to save time :).

Jasper

#33 Post by Jasper »

Hi Tman,

I was somewhat slow witted in understanding how to use your pet, but then I tried it to make a pet of the latest JWM version (869 test) and it was really smooth and easy and its size is only 74K (v 845 test - 96K).

Also, anikin's screen shot (two posts above) shows a jwm cog which suggests, to me, it is compiled machine code; whereas mine looks like a pet and installed as a pet?

My regards and thanks

I use Precise 5.6 with JWM and ROX from a Multi-session-Live-CD and have made an sfs from your pet as that will suit my personal needs best.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#34 Post by sc0ttman »

it just occured to me the problem with the jwm buildscript i made is almost certainly cos it uses which to find the 'old' jwm... it's dumb of me... jwm might not be installed.. that is off the top of my head..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#35 Post by anikin »

Hi sc0ttman,
... and I thought, why Akita was mentioned in that script :)

One more thing I forgot to mention. I have removed these:

Code: Select all

--disable-static --enable-shared --disable-debug --without-pic"
from my profile. Don't they belong to individual build scripts? They also show up in the compile log

Code: Select all

configure: WARNING: unrecognized options: --disable-static, --enable-shared, --without-pic

gcmartin

#36 Post by gcmartin »

Tman, Your GUI approach (@Sc0ttman) is going to revolutionize how things build in PUPs for both newbies and experienced alike! Users of the toolset will spend less time figuring things out and more time actually expanding their PUPPY experience and making things which move forward in use in this community.

Thanks as you move the needle in this community. Great...great....grrreeatt!

bpuppy

Compiling

#37 Post by bpuppy »

This project is very interesting to me. Great work to you all.

We are now in January 2014, whatever happened to it? Can someone give us an update on this subject please?

Jasper

#38 Post by Jasper »

Hi,

I would like to make a pet of the latest jwm v. 885, however in his ChangeLog on 4th Jan 2014 Joe wrote “Use xz instead of bz2“.

So in the jwm.bp file, in the three places where I found “bz2“ I substituted “xz
Attachments
Shot.png
(31.8 KiB) Downloaded 970 times

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#39 Post by amigo »

src2pkg -PET URL-of-source

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#40 Post by anikin »

/usr/bin/buildpet
line 107, haven't looked any further yet.

Code: Select all

#tar up the source if a dir
if [ -d $WORK_DIR/$PKG_NAME-$PKG_VER ] && [ ! -f $WORK_DIR/$PKG_NAME-$PKG_VER.tar.bz2 ];then
	cd $WORK_DIR
	tar -cjf $PKG_NAME-$PKG_VER.tar.bz2 $PKG_NAME-$PKG_VER 
	cd $BUILD_DIR
fi

Post Reply