Hello friends, how are you? I have been reading the documentation to be able to create packages but I am going back and forth between concepts and more concepts and I can't understand the mechanics of this. Could someone tell me what steps they usually use for this task. thank you!

Question about build packages
(6 posts) (3 voices)-
Posted 1 year ago #
-
Hi SliTazLover,
At first step need to have dev environment, for this you need use
tazdev
tazpkg -gi tazdev
If you would like create dev environment, we need tazdev patched for setup current chroot
https://cook.slitaz.org/current/cooker.cgi?download=tazdev-258.tazpkgFor install package you need to be root, also for gen chroot
su -
tazpkg -i <path_to_download>/tazdev-258.tazpkg
For example :tazpkg -i /home/tux/Download/tazdev-258.tazpkg
Now, setup env
tazdev gen-chroot <name_of_chroot> <version>
<name_of_chroot> could be cooking, current, other name
<version> could be stable, cooking, current!! Warn in case different name used between <name_of_chroot> <version>, we need set --mirror to ensure no issue with version
Example for current
# tazdev gen-chroot mycurrent current --mirror=https://mirror.slitaz.org/packages/current/
Generating new chroot in: /home/slitaz/mycurrent/chroot
====================================================================================================
Mirror URL: https://mirror.slitaz.org/packages/current/ [ Done ]
Installing: slitaz-base-files [ Done ]
Installing: busybox [ Done ]
Installing: cookutils [ Done ]
Installing: tazpkg [ Done ]
Installing: lzma [ Done ]
mkdir: can't create directory '/home/slitaz/mycurrent/chroot/etc': File exists
Creating resolv.conf... [ Done ]
Creating TZ... [ Done ]
Restoring host packages list... [ Done ]
====================================================================================================
Ready to chroot with: tazdev -c mycurrentWhen chroot env ready, you can start it with :
<name_of_chroot>
could be cooking or mycurrent if follow my exampletazdev chroot <name_of_chroot>
Example
# tazdev chroot mycurrent
Mounting virtual filesystems... [ Done ]
Chrooting to: /home/slitaz/mycurrent/chrootroot@slitaz:/#
Now we are inside your dev env, you can follow this to setup cook
https://doc.slitaz.org/en:cookbook:wok#overviewIn case resume to run twice command :
tazpkg -gi mercurial
(need to have mercurial when cook invoke hg to pull repository)
cook setup --wok
/!\ for current, we need adjust /etc/slitaz/cook.conf to point on wok-current instead wok /!\
sed -i "s|http://hg.slitaz.org/wok|http://hg.slitaz.org/wok-current|g" /etc/slitaz/cook.conf
You can try to rebuild packages to check how process work.
Could be resume to :
- check bdeps is available locally or download it from mirror
- download source from WGET_URL inreceipt
file
- run compile_rules function (patch sources if need, configure, make, make install)
- run genpkg_rules function to create package
- update chroot env if need to ensure keep it up to date with new buildPosted 1 year ago # -
Forget major part :)
For cook package :
cd /home/slitaz/wok
cook <pkg>Be inside wok, easy to have autocompletion
Posted 1 year ago # -
Hello Shann, master. Thanks for answering. You're going to hate me, but you can be less specific and describe only the steps, there is a lot of information but the "step by step" is missing. For example, if I wanted to create a package that changes the default wallpaper, or changes the language files (I'm doing some translations). And by the powers of Linux, you are free to reply or kick me off the forum lol. greetings
Posted 1 year ago # -
Hi,
suppose You are logged in as root and have a wallpaper of a beautiful flower named beautiful.jpg in /usr/share/images. Suppose You want to create a package beautiful-1.0.tazpkg with this image.
Now create the following folder: /var/lib/tazpkg/installed/beautiful and two text files inside:
1. files.list with a single line as content: /usr/share/images/beautiful.jpg
2. recipe with content:
PACKAGE="beautiful"
VERSION="1.0"
SHORT_DESC="Beautiful Wallpaper"
CATEGORY="misc"
MAINTAINER="nobody@slitaz.org"Then in the XTerm Terminal use the command: tazpkg repack beautiful.
This command is creating Your package beautiful-1.0.tazpkg. Now You should save this package.
To remove Your package from Your system use: tazpkg remove beautiful.
After that You can install Your package beautiful-1.0.tazpkg on Your System and other systems.
This only adds a wallpaper to /usr/share/images. You still have to change the wallpaper by hand.
This method does not contain md5sums. It creates packages only for private not offical use.Regards kubepc
Posted 1 year ago # -
Hello kubepc!, thank you very much! I could do it! This will be the first step to learn more about the packages. And who knows, maybe in the future I'll even be able to build packages like Master Shann! ha ha. I'll try to add post install commands, it's possible create something similar to a portable app, right? Alright this just got interesting again. I will continue reading and practicing, thank you very much for your advice! greetings friends!
Posted 1 year ago #
Reply
You must log in to post.