diff options
Diffstat (limited to 'python-gethash.spec')
| -rw-r--r-- | python-gethash.spec | 451 |
1 files changed, 451 insertions, 0 deletions
diff --git a/python-gethash.spec b/python-gethash.spec new file mode 100644 index 0000000..87ecde0 --- /dev/null +++ b/python-gethash.spec @@ -0,0 +1,451 @@ +%global _empty_manifest_terminate_build 0 +Name: python-gethash +Version: 5.6 +Release: 1 +Summary: Command-line hash utility +License: MIT +URL: https://github.com/xymy/gethash +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/4e/0f/130b31fc84fd30f5dc8810e6d7d6a3207fe616b4ee5e509fee7fcd04e5c5/gethash-5.6.tar.gz +BuildArch: noarch + +Requires: python3-click +Requires: python3-click-didyoumean +Requires: python3-click-option-group +Requires: python3-natsort +Requires: python3-tqdm +Requires: python3-importlib-metadata +Requires: python3-pycryptodome + +%description +# Gethash + +[](https://pypi.org/project/gethash/) +[](https://pypi.org/project/gethash/) +[](https://pepy.tech/project/gethash) +[](https://pypi.org/project/gethash/) +[](https://github.com/psf/black) +[](https://pycqa.github.io/isort/) + +Gethash is a command-line hash utility. + +## Installation + +Install from PyPI: + +```shell +$ pip install gethash +``` + +or if you need legacy hash algorithms: + +```shell +$ pip install "gethash[all]" +``` + +*Note: Gethash requires Python 3.8 and later.* + +## Usage + +After installation, 10 commands are available: + +- crc32 +- md5 +- sha1 +- sha256 +- sha512 +- sha3-256 +- sha3-512 +- blake2b +- blake2s +- gethash + +Show command-line usage: + +```shell +$ gethash --help +Usage: gethash [OPTIONS] COMMAND [ARGS]... + + Generate or check various hash values. + +Options: + -V, --version Show the version and exit. + -h, --help Show this message and exit. + +Commands: + blake2b Generate or check BLAKE2b. + blake2s Generate or check BLAKE2s. + crc32 Generate or check CRC32. + md2 Generate or check MD2. + md4 Generate or check MD4. + md5 Generate or check MD5. + md5-sha1 Generate or check MD5-SHA1. + mdc2 Generate or check MDC2. + ripemd160 Generate or check RIPEMD160. + sha1 Generate or check SHA1. + sha3-224 Generate or check SHA3-224. + sha3-256 Generate or check SHA3-256. + sha3-384 Generate or check SHA3-384. + sha3-512 Generate or check SHA3-512. + sha224 Generate or check SHA224. + sha256 Generate or check SHA256. + sha384 Generate or check SHA384. + sha512 Generate or check SHA512. + sha512-224 Generate or check SHA512-224. + sha512-256 Generate or check SHA512-256. + sm3 Generate or check SM3. + whirlpool Generate or check WHIRLPOOL. +``` + +### Generate hash values + +```shell +$ ls -l +total 296 +-rw-r--r-- 1 User 197610 68074 Jun 27 10:43 001.zip +-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip +-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip + +$ sha1 -s *.zip +7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip +0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip +10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip + +$ ls -l +total 299 +-rw-r--r-- 1 User 197610 68074 Jun 27 10:43 001.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 001.zip.sha1 +-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 002.zip.sha1 +-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 003.zip.sha1 +``` + +### Check hash values + +```shell +$ cat *.sha1 +7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip +0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip +10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip + +$ sha1 -c *.sha1 +[SUCCESS] 001.zip +[SUCCESS] 002.zip +[SUCCESS] 003.zip +``` + +## Project Links + +- Home Page: https://github.com/xymy/gethash +- PyPI Release: https://pypi.org/project/gethash/ +- Documentation: https://github.com/xymy/gethash +- Issue Tracker: https://github.com/xymy/gethash/issues +- Source Code: https://github.com/xymy/gethash + + +%package -n python3-gethash +Summary: Command-line hash utility +Provides: python-gethash +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-gethash +# Gethash + +[](https://pypi.org/project/gethash/) +[](https://pypi.org/project/gethash/) +[](https://pepy.tech/project/gethash) +[](https://pypi.org/project/gethash/) +[](https://github.com/psf/black) +[](https://pycqa.github.io/isort/) + +Gethash is a command-line hash utility. + +## Installation + +Install from PyPI: + +```shell +$ pip install gethash +``` + +or if you need legacy hash algorithms: + +```shell +$ pip install "gethash[all]" +``` + +*Note: Gethash requires Python 3.8 and later.* + +## Usage + +After installation, 10 commands are available: + +- crc32 +- md5 +- sha1 +- sha256 +- sha512 +- sha3-256 +- sha3-512 +- blake2b +- blake2s +- gethash + +Show command-line usage: + +```shell +$ gethash --help +Usage: gethash [OPTIONS] COMMAND [ARGS]... + + Generate or check various hash values. + +Options: + -V, --version Show the version and exit. + -h, --help Show this message and exit. + +Commands: + blake2b Generate or check BLAKE2b. + blake2s Generate or check BLAKE2s. + crc32 Generate or check CRC32. + md2 Generate or check MD2. + md4 Generate or check MD4. + md5 Generate or check MD5. + md5-sha1 Generate or check MD5-SHA1. + mdc2 Generate or check MDC2. + ripemd160 Generate or check RIPEMD160. + sha1 Generate or check SHA1. + sha3-224 Generate or check SHA3-224. + sha3-256 Generate or check SHA3-256. + sha3-384 Generate or check SHA3-384. + sha3-512 Generate or check SHA3-512. + sha224 Generate or check SHA224. + sha256 Generate or check SHA256. + sha384 Generate or check SHA384. + sha512 Generate or check SHA512. + sha512-224 Generate or check SHA512-224. + sha512-256 Generate or check SHA512-256. + sm3 Generate or check SM3. + whirlpool Generate or check WHIRLPOOL. +``` + +### Generate hash values + +```shell +$ ls -l +total 296 +-rw-r--r-- 1 User 197610 68074 Jun 27 10:43 001.zip +-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip +-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip + +$ sha1 -s *.zip +7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip +0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip +10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip + +$ ls -l +total 299 +-rw-r--r-- 1 User 197610 68074 Jun 27 10:43 001.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 001.zip.sha1 +-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 002.zip.sha1 +-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 003.zip.sha1 +``` + +### Check hash values + +```shell +$ cat *.sha1 +7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip +0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip +10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip + +$ sha1 -c *.sha1 +[SUCCESS] 001.zip +[SUCCESS] 002.zip +[SUCCESS] 003.zip +``` + +## Project Links + +- Home Page: https://github.com/xymy/gethash +- PyPI Release: https://pypi.org/project/gethash/ +- Documentation: https://github.com/xymy/gethash +- Issue Tracker: https://github.com/xymy/gethash/issues +- Source Code: https://github.com/xymy/gethash + + +%package help +Summary: Development documents and examples for gethash +Provides: python3-gethash-doc +%description help +# Gethash + +[](https://pypi.org/project/gethash/) +[](https://pypi.org/project/gethash/) +[](https://pepy.tech/project/gethash) +[](https://pypi.org/project/gethash/) +[](https://github.com/psf/black) +[](https://pycqa.github.io/isort/) + +Gethash is a command-line hash utility. + +## Installation + +Install from PyPI: + +```shell +$ pip install gethash +``` + +or if you need legacy hash algorithms: + +```shell +$ pip install "gethash[all]" +``` + +*Note: Gethash requires Python 3.8 and later.* + +## Usage + +After installation, 10 commands are available: + +- crc32 +- md5 +- sha1 +- sha256 +- sha512 +- sha3-256 +- sha3-512 +- blake2b +- blake2s +- gethash + +Show command-line usage: + +```shell +$ gethash --help +Usage: gethash [OPTIONS] COMMAND [ARGS]... + + Generate or check various hash values. + +Options: + -V, --version Show the version and exit. + -h, --help Show this message and exit. + +Commands: + blake2b Generate or check BLAKE2b. + blake2s Generate or check BLAKE2s. + crc32 Generate or check CRC32. + md2 Generate or check MD2. + md4 Generate or check MD4. + md5 Generate or check MD5. + md5-sha1 Generate or check MD5-SHA1. + mdc2 Generate or check MDC2. + ripemd160 Generate or check RIPEMD160. + sha1 Generate or check SHA1. + sha3-224 Generate or check SHA3-224. + sha3-256 Generate or check SHA3-256. + sha3-384 Generate or check SHA3-384. + sha3-512 Generate or check SHA3-512. + sha224 Generate or check SHA224. + sha256 Generate or check SHA256. + sha384 Generate or check SHA384. + sha512 Generate or check SHA512. + sha512-224 Generate or check SHA512-224. + sha512-256 Generate or check SHA512-256. + sm3 Generate or check SM3. + whirlpool Generate or check WHIRLPOOL. +``` + +### Generate hash values + +```shell +$ ls -l +total 296 +-rw-r--r-- 1 User 197610 68074 Jun 27 10:43 001.zip +-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip +-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip + +$ sha1 -s *.zip +7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip +0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip +10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip + +$ ls -l +total 299 +-rw-r--r-- 1 User 197610 68074 Jun 27 10:43 001.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 001.zip.sha1 +-rw-r--r-- 1 User 197610 126717 Jun 27 10:43 002.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 002.zip.sha1 +-rw-r--r-- 1 User 197610 103064 Jun 27 10:44 003.zip +-rw-r--r-- 1 User 197610 51 Jun 27 10:44 003.zip.sha1 +``` + +### Check hash values + +```shell +$ cat *.sha1 +7701133eb84b567362fbf1b9e3883d7620ee8ada *001.zip +0d6c6cb6908064139f419c1b528f99142a1f2a49 *002.zip +10e2c0d8aa85add2ba495393f7f7f0b0baaf34a6 *003.zip + +$ sha1 -c *.sha1 +[SUCCESS] 001.zip +[SUCCESS] 002.zip +[SUCCESS] 003.zip +``` + +## Project Links + +- Home Page: https://github.com/xymy/gethash +- PyPI Release: https://pypi.org/project/gethash/ +- Documentation: https://github.com/xymy/gethash +- Issue Tracker: https://github.com/xymy/gethash/issues +- Source Code: https://github.com/xymy/gethash + + +%prep +%autosetup -n gethash-5.6 + +%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-gethash -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 5.6-1 +- Package Spec generated |
