Hi,
I have recently started working on packaging bsnes, so that users will be able to install it more easily. Two questions came up so far:
1. Where to put cart.db? Is there a specific relative path where the emulator looks for it?
2. Is support for some sort of system-wide configuration available? Say, having an /etc/bsnes.conf file with some sane defaults would be really appreciated.
Thanks in advance.
ETA: OK, although cart.db is not installed ATM, I have submitted my package for review [1]. Comments are of course more than welcome.
[1] https://bugzilla.rpmfusion.org/show_bug.cgi?id=15
Packaging bsnes for Fedora
Moderator: General Mods
Hi.
I should also note that there's an install target in the new unreleased version, which should make this easier in the future.
While I do appreciate the effort, and give you permission to make the RPM so long as source code itself remains unmodified, Fedora won't approve your submission, because the license is not GPL compatible. Same reason I can't get a deb into Ubuntu / multiverse, sadly. And yet they have the closed source Flash / nvidia stuff available ...I have recently started working on packaging bsnes, so that users will be able to install it more easily.
For v0.025, it needs to be in the same folder as the binary. But thanks to Nach, the file will no longer be needed as of v0.026. It has been removed in the private WIPs.1. Where to put cart.db? Is there a specific relative path where the emulator looks for it?
I should also note that there's an install target in the new unreleased version, which should make this easier in the future.
Unfortunately, no. The config file resides at ~/.bsnes/bsnes.cfg. I asked everyone which path would be preferred, and everyone preferred the local path to a global one. Also, a file in /etc would not be editable without root privileges (or make the installer chmod the file, which would also be unusual); bsnes needs to be able to edit this file.2. Is support for some sort of system-wide configuration available? Say, having an /etc/bsnes.conf file with some sane defaults would be really appreciated.
I know of this limitation, hence I have submitted the package to rpmfusion repository. The non-free part of the repo allows for more strict licenses. Source code is of course intact, as required by the license. I was thinking about patching the makefile to use system-wide optimisation flags, but I suppose this requires your permission. I have converted the icon to png to allow a menu entry, as well as fixed permissions and line endings on license.txt, readme.txt and cart.db, hopefully that's OK with the license. If not, I can revert that, please let me know.byuu wrote:Hi.
While I do appreciate the effort, and give you permission to make the RPM so long as source code itself remains unmodified, Fedora won't approve your submission, because the license is not GPL compatible. Same reason I can't get a deb into Ubuntu / multiverse, sadly. And yet they have the closed source Flash / nvidia stuff available ...I have recently started working on packaging bsnes, so that users will be able to install it more easily.
Thanks for the info, I'll put the database into bindir for now then.byuu wrote:For v0.025, it needs to be in the same folder as the binary. But thanks to Nach, the file will no longer be needed as of v0.026. It has been removed in the private WIPs.1. Where to put cart.db? Is there a specific relative path where the emulator looks for it?
There aren't that many files to install so doing it the hard way wasn't that painfulbyuu wrote:I should also note that there's an install target in the new unreleased version, which should make this easier in the future.

OK, no problem. Thanks for all the info again.byuu wrote:Unfortunately, no. The config file resides at ~/.bsnes/bsnes.cfg. I asked everyone which path would be preferred, and everyone preferred the local path to a global one. Also, a file in /etc would not be editable without root privileges (or make the installer chmod the file, which would also be unusual); bsnes needs to be able to edit this file.2. Is support for some sort of system-wide configuration available? Say, having an /etc/bsnes.conf file with some sane defaults would be really appreciated.
Sure, go for it.I was thinking about patching the makefile to use system-wide optimisation flags, but I suppose this requires your permission.
If you mean \r\n -> \n, that's fine. I also made a 48x48 PNG of the icon in the current WIP. I copy it to /usr/local/share/icons with make install, not sure how correct that is, but it gets the icon onto the binary, so I'm guessing it's good enough.I have converted the icon to png to allow a menu entry, as well as fixed permissions and line endings on license.txt, readme.txt and cart.db, hopefully that's OK with the license.
I don't mind these kinds of changes, the only reason I add a "no modifications" clause is because if I try and define a "level of acceptable changes", it would be too vague and open to abuse.
Thanks again for making the RPM :)
I missed that before, but it looks like source files are installed as a part of debuginfo package, and thus rpmlint complains about permissions and end-of-line encoding. Can I fix that? Summing up, the changes required would be the following:
Code: Select all
#fix permissions and line endings
chmod 644 license.txt readme.txt cart.db
sed -i 's/\r//' license.txt readme.txt
find src -type f \( -name \*.cpp -or -name \*.h -or -name \*.c \) -exec chmod 644 {} \;
find src -type f \( -name \*.cpp -or -name \*.h -or -name \*.c \) -exec sed -i 's/\r//' {} \;
#use system optflags
sed -i "s#CFLAGS = -O3 -fomit-frame-pointer#CFLAGS = %{optflags}#" src/Makefile
#convert the icon to PNG
convert src/data/bsnes.ico bsnes.png