Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add psp-create-license-directory script #256

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

sharkwouter
Copy link
Member

@sharkwouter sharkwouter commented Dec 24, 2024

This script can be used to create a directory called third-party-licenses which contain all the licenses for libraries used within your project. It uses psp-pacman to determine which licenses are relevant. All the user has to do it run it with a list of libraries that they use from PSPDEV.

Here is an example for a project that uses SDL2, some helper libraries for SDL2 and jsoncpp:

psp-create-license-directory sdl2 sdl2-ttf sdl2-image sdl2-mixer jsoncpp

The output would look like this:

Adding license for pspsdk to third-party-licenses
Adding license for newlib to third-party-licenses
Adding license for pthread-embedded to third-party-licenses
Adding license for sdl2 to third-party-licenses
Found dependency libpspvram for sdl2
Adding license for libpspvram to third-party-licenses
Found dependency pspgl for sdl2
Adding license for pspgl to third-party-licenses
Adding license for sdl2-ttf to third-party-licenses
Found dependency harfbuzz for sdl2-ttf
Adding license for harfbuzz to third-party-licenses
Found dependency freetype2 for harfbuzz
Adding license for freetype2 to third-party-licenses
Found dependency zlib for freetype2
Adding license for zlib to third-party-licenses
Found dependency bzip2 for freetype2
Adding license for bzip2 to third-party-licenses
Found dependency libpng for freetype2
Adding license for libpng to third-party-licenses
Adding license for sdl2-image to third-party-licenses
Found dependency jpeg for sdl2-image
Adding license for jpeg to third-party-licenses
Adding license for sdl2-mixer to third-party-licenses
Found dependency libmodplug for sdl2-mixer
Adding license for libmodplug to third-party-licenses
Found dependency libvorbis for sdl2-mixer
Adding license for libvorbis to third-party-licenses
Found dependency libogg for libvorbis
Adding license for libogg to third-party-licenses
Adding license for jsoncpp to third-party-licenses

The resulting directory would have the following content:

wouter@wouter-pc:~$ ls -R third-party-licenses/
third-party-licenses/:
bzip2      jsoncpp     libpspvram  pspsdk            sdl2-mixer
freetype2  libmodplug  libvorbis   pthread-embedded  sdl2-ttf
harfbuzz   libogg      newlib      sdl2              zlib
jpeg       libpng      pspgl       sdl2-image

third-party-licenses/bzip2:
COPYING

third-party-licenses/freetype2:
FTL.TXT  GPLv2.TXT  LICENSE.TXT

third-party-licenses/harfbuzz:
COPYING

third-party-licenses/jpeg:
README.ijg

third-party-licenses/jsoncpp:
LICENSE

third-party-licenses/libmodplug:
COPYING

third-party-licenses/libogg:
COPYING

third-party-licenses/libpng:
LICENSE

third-party-licenses/libpspvram:
LICENSE

third-party-licenses/libvorbis:
COPYING

third-party-licenses/newlib:
COPYING.NEWLIB

third-party-licenses/pspgl:
LICENSE

third-party-licenses/pspsdk:
LICENSE

third-party-licenses/pthread-embedded:
COPYING.LIB  COPYING.vita  README.md

third-party-licenses/sdl2:
LICENSE.txt

third-party-licenses/sdl2-image:
LICENSE.txt

third-party-licenses/sdl2-mixer:
LICENSE.txt

third-party-licenses/sdl2-ttf:
LICENSE.txt

third-party-licenses/zlib:
README

Additionally it has a -l option which makes it list the libraries installed.

Copy link
Contributor

@bucanero bucanero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome addition ⭐️

@sharkwouter sharkwouter merged commit 68f1094 into master Dec 24, 2024
2 checks passed
@sharkwouter sharkwouter deleted the add-create-license-directory-script branch December 24, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants