diff options
Diffstat (limited to 'python-pyspiflash.spec')
-rw-r--r-- | python-pyspiflash.spec | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/python-pyspiflash.spec b/python-pyspiflash.spec new file mode 100644 index 0000000..fe3061d --- /dev/null +++ b/python-pyspiflash.spec @@ -0,0 +1,88 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyspiflash +Version: 0.6.3 +Release: 1 +Summary: SPI data flash device drivers (pure Python) +License: MIT +URL: http://github.com/eblot/pyspiflash +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/04/cd/4a2d4985bf38a434f571e8947410bf0a284da5bb117e54cec1d7e45989c0/pyspiflash-0.6.3.tar.gz +BuildArch: noarch + +Requires: python3-pyftdi + +%description +SPI data flash device drivers (pure Python) +SPI flash devices, also known as *DataFlash* are commonly found in embedded +products, to store firmware, microcode or configuration parameters. +PySpiFlash_ comes with several pure Python drivers for those flash devices, that +demonstrate use of SPI devices with PyFtdi_. It could also be useful to dump +flash contents or recover from a bricked devices. + +%package -n python3-pyspiflash +Summary: SPI data flash device drivers (pure Python) +Provides: python-pyspiflash +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pyspiflash +SPI data flash device drivers (pure Python) +SPI flash devices, also known as *DataFlash* are commonly found in embedded +products, to store firmware, microcode or configuration parameters. +PySpiFlash_ comes with several pure Python drivers for those flash devices, that +demonstrate use of SPI devices with PyFtdi_. It could also be useful to dump +flash contents or recover from a bricked devices. + +%package help +Summary: Development documents and examples for pyspiflash +Provides: python3-pyspiflash-doc +%description help +SPI data flash device drivers (pure Python) +SPI flash devices, also known as *DataFlash* are commonly found in embedded +products, to store firmware, microcode or configuration parameters. +PySpiFlash_ comes with several pure Python drivers for those flash devices, that +demonstrate use of SPI devices with PyFtdi_. It could also be useful to dump +flash contents or recover from a bricked devices. + +%prep +%autosetup -n pyspiflash-0.6.3 + +%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-pyspiflash -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 0.6.3-1 +- Package Spec generated |