WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: If I am installing SLD2_mixer (for example) from source -- How to persist?  (Read 1989 times)

Offline knation

  • Newbie
  • *
  • Posts: 2
I am installing some packages manually, for example:
```
wget https://libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz
tar -zxvf SDL2_mixer-2.0.4.tar.gz
pushd SDL2_mixer-2.0.4
./configure
make -j$(nproc)
sudo make install
popd
```
How would I persist these installs?

Thanks!

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 718
You have to read little more on the wiki i think.
You have to make your own extension.
And after you have made the extension you could test it with the script to see if there some mistakes.

When you are done creating an extension and test it, you can share it back to the community.

Here some links you could read little more how to do this things.
https://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions
https://wiki.tinycorelinux.net/doku.php?id=wiki:start#persistence

If you are planning on submitting your extension for inclusion in the repository, you should run the extension auditing script, which is in the repository as submitqc.tcz.

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 287
Actually I already made PiCore 13 extensions for sdl2_mixer last year, but it was in order to build another program which I haven't got around to testing properly yet so I never submitted them (too lazy to compile some other program just to test whether it works).

But I can submit the extensions later, and if Juanito doesn't mind that they're untested, they'll be added to the repo as sdl2_mixer.tcz and sdl2_mixer-dev.tcz.

On the other hand, to answer your question in the present, here are my compiling notes for sdl2_mixer. Note that I didn't use the "-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" CFLAGS because I checked GCC on PiCore and saw that these were already set as defaults. However Juanito has since advised me to use them anyway just in case, so you may want to add those. I seriously doubt that there's any trouble from leaving them out though.

Code: [Select]
PiCore 13.x SDL2_mixer 2.6.2:

From:
https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.6.2.tar.gz

Based on x86_64 extension:
http://mirrors.dotsrc.org/tinycorelinux/10.x/x86_64/tcz/src/sdl2_mixer/compile_sdl2_mixer

* Install extensions: compiletc sdl2-dev mpg123-dev opusfile-dev squashfs-tools liblz4
* export CFLAGS="-flto -Os -pipe" CXXFLAGS="-flto -Os -pipe -fno-exceptions -fno-rtti" LDFLAGS="-Wl,-O1"
* ./configure --prefix=/usr/local --localstatedir=/var --enable-music-mp3-mpg123
* make
* src/sdl2_mixer

* touch /tmp/mark
* sudo make DESTDIR=/tmp/sdl2_mixer install
* split /tmp/sdl2_mixer into directories: sdl2_mixer sdl2_mixer-dev

* sudo chown -R root:root sdl2_mixer*
* sudo strip sdl2_mixer/usr/local/lib/libSDL2_mixer-2.0.so.0.600.2
* In each dir. run "find usr ! -type d | sed "s/^/\//g" > ../sdl2_mixer.tcz.list".
 - for dir in `find -maxdepth 1 -mindepth 1 -type d`; do cd $dir; find usr ! -type d | sed "s/^/\//g" > ../$dir.tcz.list; cd ..; done
* sudo chown -R root:root *
* Make into extensions using mksquashfs. "mksquashfs sdl2_mixer sdl2_mixer.tcz
  "md5sum sdl2_mixer.tcz > sdl2_mixer.tcz.md5.txt" etc...
 - for dir in `find -maxdepth 1 -mindepth 1 -type d`; do mksquashfs $dir ${dir#./}.tcz; md5sum ${dir#./}.tcz > ${dir#./}.tcz.md5.txt; done
* Make sdl2_mixer.tcz.dep:

$ ldd /tmp/sdl2_mixer/usr/local/lib/libSDL2_mixer-2.0.so.0.600.2

Deps:
sdl2_mixer.tcz.dep
 SDL2.tcz
sdl2_mixer-dev.tcz.dep
 sdl2_mixer.tcz
 sdl2-dev.tcz
 mpg123-dev.tcz
 opusfile-dev.tcz


* Copy sdl2_mixer.tcz (+ dep, md5) to "tce/optional".
* tce-load -i sdl2_mixer

I also have an extension for alsa-oss which I can't really remember whether I've tested or not.
« Last Edit: January 26, 2023, 05:18:41 PM by CNK »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14831
But I can submit the extensions later, and if Juanito doesn't mind that they're untested, they'll be added to the repo as sdl2_mixer.tcz and sdl2_mixer-dev.tcz.

Please go ahead

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 287
But I can submit the extensions later, and if Juanito doesn't mind that they're untested, they'll be added to the repo as sdl2_mixer.tcz and sdl2_mixer-dev.tcz.

Please go ahead

OK, submitted.