summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-29 11:28:10 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-29 11:28:10 +0000
commit5e4740f1867b14fb8723fd4b4884e422cd9effd5 (patch)
treee83684af64180ef01f2149b9f08bac335c757fe9
parent09b93050038b22fc675f914c487df37841ca5b4a (diff)
automatic import of python-rhdndat
-rw-r--r--.gitignore1
-rw-r--r--python-rhdndat.spec190
-rw-r--r--sources1
3 files changed, 192 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..f3d1519 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/rhdndat-2.6.7.tar.gz
diff --git a/python-rhdndat.spec b/python-rhdndat.spec
new file mode 100644
index 0000000..7152b53
--- /dev/null
+++ b/python-rhdndat.spec
@@ -0,0 +1,190 @@
+%global _empty_manifest_terminate_build 0
+Name: python-rhdndat
+Version: 2.6.7
+Release: 1
+Summary: www.romhacking.net update checker
+License: GNU General Public License v3.0
+URL: https://github.com/i30817/rhdndat
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9c/4a/45167499eda371720bfb2b9c136feee97dd60794d81ba37ceac53710f9d1/rhdndat-2.6.7.tar.gz
+BuildArch: noarch
+
+Requires: python3-beautifulsoup4
+Requires: python3-chd-rs-py
+Requires: python3-colorama
+Requires: python3-lxml
+Requires: python3-questionary
+Requires: python3-typer
+Requires: python3-xattr
+
+%description
+**rhdndat** finds ``rhdndat.ver`` files to check for romhacking.net updates
+A version file is named ``rhdndat.ver`` and has a version number line followed by a romhacking.net url line, repeated. These correspond to each hack or translation. To check for needed updates to version file, if any patch version in the file does not match the version on the romhacking.net patch page, it presents a warning.
+**rhdndat-rn** renames files and patches to new .DAT [1]_ [2]_ rom names if it can find the rom checksum in those .DAT files and memorizes the checksum of the 'original rom' as a extended attribute ``user.rhdndat.rom_sha1`` to speed up renaming in subsequent executions (in unix, not windows).
+To find the checksum of the original file for hardpatched roms, rhdndat-rn can support a custom convention for 'revert patches'. Revert patches are a patch that you apply to a hardpatched file to get the original. These have the same name as the file and extension '.rxdelta' and are done with xdelta3. I keep them for patch updates for cd images (i don't know of any emulator that supports softpatching for those, except those that support delta chd).
+rhdndat-rn will read a xml dat file or every dat file from a directory given, and ask for renaming for every match where the rom filename is not equal to the dat name proposed. It will skip the question if all the names proposed already exist in the rom directory, and not allow a rename to a name that is existing file in the rom directory.
+Besides bare rom files, files affected by renames are compressed wii/gamecube .rvz files, .cue/.toc/.gdi (treated especially to not ask for every track), the softpatch types .ips, .bps, .ups, including the new retroarch multiple softpatch convention (a number after the softpatch extension), .rxdelta, .pal NES color palettes, and sbi subchannel data files.
+``nes fds lnx a78`` roms require headers and are hardcoded to ignore headers when calculating ``user.rhdndat.rom_sha1`` to match the no-intro dat checksums that checksum everything except the header. This is problematic for hacks, where you can 'verify' a file is the right rom, but the hack was created for a rom with another header. A solution that keeps the softpatch is tracking down the right rom, hardpatching it, and creating a softpatch from the current no-intro rom to the older patched rom. For sfc and pce ips hacks that target a headered rom I recommend ipsbehead to change the patch to target the no-header rom.
+Requires xdelta3 (to process rxdelta) and dolphin-tool (to operate on rvz files) on path or the same directory.
+To check for updates if you have the version files:
+``rhdndat romdir``
+ check if there are any updates
+To rename files if you have the dat files:
+``rhdndat-rn [--force] [--ext a78 --ext nes ...] romdir xmlpath``
+ the rom extensions should be all file extensions on the files you want to rename (see below for default)
+rhdndat [OPTIONS] ROMDIR
+ --show Show link to each checked directory.
+ --install-completion Install completion for the current shell.
+ --show-completion Show completion for the current shell, to copy it or
+ customize the installation.
+ --help Show this message and exit.
+rhdndat-rn [OPTIONS] ROMDIR XMLPATH
+ --skip DIRECTORY Directory to skip, can be repeated.
+ --ext TEXT ROM extensions to find names of, can be
+ repeated. Note that you can ommit this
+ argument to get the predefined list.
+ [default: a78, hdi, fdi, ngc, ws, wsc, pce,
+ gb, gba, gbc, n64, v64, z64, 3ds, nds, nes,
+ lnx, fds, sfc, smc, bs, nsp, 32x, gg, sms,
+ md, iso, dim, adf, ipf, dsi, wad, cue, gdi,
+ toc, rvz]
+ --force Force a recalculation and store of checksum
+ (on windows the calculation always happens).
+ --no-rename Check and store checksums only.
+ --verbose Print more information about skipped roms.
+ --install-completion Install completion for the current shell.
+ --show-completion Show completion for the current shell, to copy it or
+ customize the installation.
+ --help Show this message and exit.
+
+%package -n python3-rhdndat
+Summary: www.romhacking.net update checker
+Provides: python-rhdndat
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-rhdndat
+**rhdndat** finds ``rhdndat.ver`` files to check for romhacking.net updates
+A version file is named ``rhdndat.ver`` and has a version number line followed by a romhacking.net url line, repeated. These correspond to each hack or translation. To check for needed updates to version file, if any patch version in the file does not match the version on the romhacking.net patch page, it presents a warning.
+**rhdndat-rn** renames files and patches to new .DAT [1]_ [2]_ rom names if it can find the rom checksum in those .DAT files and memorizes the checksum of the 'original rom' as a extended attribute ``user.rhdndat.rom_sha1`` to speed up renaming in subsequent executions (in unix, not windows).
+To find the checksum of the original file for hardpatched roms, rhdndat-rn can support a custom convention for 'revert patches'. Revert patches are a patch that you apply to a hardpatched file to get the original. These have the same name as the file and extension '.rxdelta' and are done with xdelta3. I keep them for patch updates for cd images (i don't know of any emulator that supports softpatching for those, except those that support delta chd).
+rhdndat-rn will read a xml dat file or every dat file from a directory given, and ask for renaming for every match where the rom filename is not equal to the dat name proposed. It will skip the question if all the names proposed already exist in the rom directory, and not allow a rename to a name that is existing file in the rom directory.
+Besides bare rom files, files affected by renames are compressed wii/gamecube .rvz files, .cue/.toc/.gdi (treated especially to not ask for every track), the softpatch types .ips, .bps, .ups, including the new retroarch multiple softpatch convention (a number after the softpatch extension), .rxdelta, .pal NES color palettes, and sbi subchannel data files.
+``nes fds lnx a78`` roms require headers and are hardcoded to ignore headers when calculating ``user.rhdndat.rom_sha1`` to match the no-intro dat checksums that checksum everything except the header. This is problematic for hacks, where you can 'verify' a file is the right rom, but the hack was created for a rom with another header. A solution that keeps the softpatch is tracking down the right rom, hardpatching it, and creating a softpatch from the current no-intro rom to the older patched rom. For sfc and pce ips hacks that target a headered rom I recommend ipsbehead to change the patch to target the no-header rom.
+Requires xdelta3 (to process rxdelta) and dolphin-tool (to operate on rvz files) on path or the same directory.
+To check for updates if you have the version files:
+``rhdndat romdir``
+ check if there are any updates
+To rename files if you have the dat files:
+``rhdndat-rn [--force] [--ext a78 --ext nes ...] romdir xmlpath``
+ the rom extensions should be all file extensions on the files you want to rename (see below for default)
+rhdndat [OPTIONS] ROMDIR
+ --show Show link to each checked directory.
+ --install-completion Install completion for the current shell.
+ --show-completion Show completion for the current shell, to copy it or
+ customize the installation.
+ --help Show this message and exit.
+rhdndat-rn [OPTIONS] ROMDIR XMLPATH
+ --skip DIRECTORY Directory to skip, can be repeated.
+ --ext TEXT ROM extensions to find names of, can be
+ repeated. Note that you can ommit this
+ argument to get the predefined list.
+ [default: a78, hdi, fdi, ngc, ws, wsc, pce,
+ gb, gba, gbc, n64, v64, z64, 3ds, nds, nes,
+ lnx, fds, sfc, smc, bs, nsp, 32x, gg, sms,
+ md, iso, dim, adf, ipf, dsi, wad, cue, gdi,
+ toc, rvz]
+ --force Force a recalculation and store of checksum
+ (on windows the calculation always happens).
+ --no-rename Check and store checksums only.
+ --verbose Print more information about skipped roms.
+ --install-completion Install completion for the current shell.
+ --show-completion Show completion for the current shell, to copy it or
+ customize the installation.
+ --help Show this message and exit.
+
+%package help
+Summary: Development documents and examples for rhdndat
+Provides: python3-rhdndat-doc
+%description help
+**rhdndat** finds ``rhdndat.ver`` files to check for romhacking.net updates
+A version file is named ``rhdndat.ver`` and has a version number line followed by a romhacking.net url line, repeated. These correspond to each hack or translation. To check for needed updates to version file, if any patch version in the file does not match the version on the romhacking.net patch page, it presents a warning.
+**rhdndat-rn** renames files and patches to new .DAT [1]_ [2]_ rom names if it can find the rom checksum in those .DAT files and memorizes the checksum of the 'original rom' as a extended attribute ``user.rhdndat.rom_sha1`` to speed up renaming in subsequent executions (in unix, not windows).
+To find the checksum of the original file for hardpatched roms, rhdndat-rn can support a custom convention for 'revert patches'. Revert patches are a patch that you apply to a hardpatched file to get the original. These have the same name as the file and extension '.rxdelta' and are done with xdelta3. I keep them for patch updates for cd images (i don't know of any emulator that supports softpatching for those, except those that support delta chd).
+rhdndat-rn will read a xml dat file or every dat file from a directory given, and ask for renaming for every match where the rom filename is not equal to the dat name proposed. It will skip the question if all the names proposed already exist in the rom directory, and not allow a rename to a name that is existing file in the rom directory.
+Besides bare rom files, files affected by renames are compressed wii/gamecube .rvz files, .cue/.toc/.gdi (treated especially to not ask for every track), the softpatch types .ips, .bps, .ups, including the new retroarch multiple softpatch convention (a number after the softpatch extension), .rxdelta, .pal NES color palettes, and sbi subchannel data files.
+``nes fds lnx a78`` roms require headers and are hardcoded to ignore headers when calculating ``user.rhdndat.rom_sha1`` to match the no-intro dat checksums that checksum everything except the header. This is problematic for hacks, where you can 'verify' a file is the right rom, but the hack was created for a rom with another header. A solution that keeps the softpatch is tracking down the right rom, hardpatching it, and creating a softpatch from the current no-intro rom to the older patched rom. For sfc and pce ips hacks that target a headered rom I recommend ipsbehead to change the patch to target the no-header rom.
+Requires xdelta3 (to process rxdelta) and dolphin-tool (to operate on rvz files) on path or the same directory.
+To check for updates if you have the version files:
+``rhdndat romdir``
+ check if there are any updates
+To rename files if you have the dat files:
+``rhdndat-rn [--force] [--ext a78 --ext nes ...] romdir xmlpath``
+ the rom extensions should be all file extensions on the files you want to rename (see below for default)
+rhdndat [OPTIONS] ROMDIR
+ --show Show link to each checked directory.
+ --install-completion Install completion for the current shell.
+ --show-completion Show completion for the current shell, to copy it or
+ customize the installation.
+ --help Show this message and exit.
+rhdndat-rn [OPTIONS] ROMDIR XMLPATH
+ --skip DIRECTORY Directory to skip, can be repeated.
+ --ext TEXT ROM extensions to find names of, can be
+ repeated. Note that you can ommit this
+ argument to get the predefined list.
+ [default: a78, hdi, fdi, ngc, ws, wsc, pce,
+ gb, gba, gbc, n64, v64, z64, 3ds, nds, nes,
+ lnx, fds, sfc, smc, bs, nsp, 32x, gg, sms,
+ md, iso, dim, adf, ipf, dsi, wad, cue, gdi,
+ toc, rvz]
+ --force Force a recalculation and store of checksum
+ (on windows the calculation always happens).
+ --no-rename Check and store checksums only.
+ --verbose Print more information about skipped roms.
+ --install-completion Install completion for the current shell.
+ --show-completion Show completion for the current shell, to copy it or
+ customize the installation.
+ --help Show this message and exit.
+
+%prep
+%autosetup -n rhdndat-2.6.7
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-rhdndat -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 2.6.7-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..46ded8c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+ef40a4b6198ff6d26aea3c4c7c379ef4 rhdndat-2.6.7.tar.gz