#2 Revert "Rebuilt"
Closed 5 years ago by mtasaka. Opened 5 years ago by zbyszek.
rpms/ zbyszek/catfish master  into  master

file modified
+44 -175
@@ -7,16 +7,7 @@ 

  %define		mainver		1.4.5

  %undefine		betaver		

  

- %define		fedoraver	3

- 

- %global	description_common \

- Catfish is a handy file searching tool. The interface is \

- intentionally lightweight and simple, using only GTK+3.\

- You can configure it to your needs by using several command line\

- options.\

- %{nil}

- 

- %global	support_python3		1

+ %define		fedoraver	4

  

  Name:		catfish

  Version:	%{mainver}
@@ -32,50 +23,6 @@ 

  BuildRequires:	gettext

  BuildRequires:	intltool

  

- %if 0%{?fedora} >= 28

- %package -n python2-%{name}

- Summary:        A handy file search tool using python 2

- %endif

- 

- BuildRequires:	python2-devel

- BuildRequires:	python2-distutils-extra

- BuildRequires:	python2-setuptools

- BuildRequires:	%{_bindir}/appstream-util

- 

- %BothRequires	pygobject3

- %BothRequires	python-pexpect

- 

- Requires:	%{name}-common = %{version}-%{release}

- Requires:	xdg-utils

- # search engine

- Requires:	%{_bindir}/locate

- # icon

- # Requires:	redhat-artwork

- 

- # Upstream rename

- Obsoletes:	search4files <= 0.2a

- Provides:	search4files = %{version}-%{release}

- # Obsolete old search engine subpackage

- Obsoletes:	catfish-engines <= 0.6

- 

- %if 0%{?fedora} >= 28

- %{?python_provide:%python_provide python2-%{name}}

- Obsoletes:	%{name} < %{version}-%{release}

- Provides:		%{name} = %{version}-%{release}

- 

- %description -n python2-%{name}

- %description_common

- 

- This package uses python 2 for runtime executable.

- %endif

- 

- %description

- %description_common

- 

- %if %support_python3

- %package	python3

- Summary:	A handy file search tool using python3

- 

  BuildRequires:	python3-devel

  BuildRequires:	python3-distutils-extra

  BuildRequires:	python3-setuptools
@@ -84,32 +31,29 @@ 

  %BothRequires	python3-gobject

  %BothRequires	python3-pexpect

  

- Requires:	%{name}-common = %{version}-%{release}

+ # Remove in Fedora 33:

+ Obsoletes:	python2-%{name} < 1.4.5-2

+ Obsoletes:	python-%{name} < 1.4.5-2

+ Obsoletes:	%{name}-python3 < 1.4.5-2

+ Obsoletes:	%{name}-common < 1.4.5-2

+ Provides:	%{name}-python3 = %{version}-%{release}

+ Provides:	%{name}-common = %{version}-%{release}

+ 

  Requires:	xdg-utils

  # search engine

  Requires:	%{_bindir}/locate

  # icon

  # Requires:	redhat-artwork

  

- %{?python_provide:%python_provide python3-%{name}}

- 

- %description	python3

- %description_common

- 

- This package uses python 3 for runtime executable.

- %endif

- 

- %package	common

- Group:	Applications/File

- Summary:	Common files for catfish

- 

- %description	common

- This package contains common files for catfish rpm.

+ %description

+ Catfish is a handy file searching tool. The interface is

+ intentionally lightweight and simple, using only GTK+3.

+ You can configure it to your needs by using several command line

+ options.

  

  

  %prep

- %setup -q -T -c -a 0 %{name}-%{mainver}%{?betaver}

- pushd %{name}-%{mainver}*

+ %setup -q -n %{name}-%{mainver}%{?betaver}

  

  # Fix up permissions...

  find . -type f -print0 | xargs --null chmod 0644
@@ -119,139 +63,64 @@ 

  sed -i data/metainfo/catfish.appdata.xml.in \

  	-e '\@version=.*1\.2\.0@s|2018-08-16|2014-08-16|'

  

- popd

  

  %build

  # Remove unneeded shebang

  grep -rl "/usr/bin/env" . | \

  	xargs sed -i -e "\@/usr/bin/env[ ][ ]*python@d"

  

- TOPDIR=$(pwd)

- rm -rf ./_TMPINSTDIR

- mkdir -p ./_TMPINSTDIR/python2

- mkdir -p ./_TMPINSTDIR/python3

- 

- pushd %{name}-%{mainver}*

- 

- %__python2 setup.py \

- 	install \

- 	--root ${TOPDIR}/_TMPINSTDIR/python2

- %if %support_python3

- %__python3 setup.py \

- 	install \

- 	--root ${TOPDIR}/_TMPINSTDIR/python3

- %endif

- 

- popd

- 

- %if %support_python3

- mv _TMPINSTDIR/python3/%{_bindir}/catfish{,-py3}

- %endif

- 

- pushd _TMPINSTDIR

- 

- # Sanity check for file differenct

- %if %support_python3

- ( cd python2 ; find . -type f ) | while read f

- do

- 	test -f python3/$f || continue

- 	cmp -s python2/$f python3/$f

- done

- 

- bash -c \

- 	"diff -u python2/%{_bindir}/catfish <(cat python3/%{_bindir}/catfish-py3 | sed -e 's|python3|python2|')"

- %endif

- 

- ln -sf catfish ./python2/%{_bindir}/catfish-py2

- 

- desktop-file-validate \

- 	./python2/%{_datadir}/applications/%{name}.desktop

- appstream-util validate-relax --nonet \

- 	./python2/%{_datadir}/metainfo/%{name}.appdata.xml

- 

- %if %support_python3

- pushd python3/%{_datadir}/applications/

- mv %{name}{,-py3}.desktop

- sed -i %{name}-py3.desktop \

- 	-e 's|/usr/bin/catfish$|/usr/bin/catfish-py3|' \

- 	-e 's|Catfish|Catfish(py3)|'\

- 	%{nil}

- desktop-file-validate ./%{name}-py3.desktop

- popd

- 

- pushd python3/%{_datadir}/metainfo

- mv catfish.appdata.xml catfish-py3.appdata.xml

- sed -i catfish-py3.appdata.xml \

- 	-e 's|catfish\.desktop|catfish-py3.desktop|' \

- 	%{nil}

- appstream-util validate-relax --nonet catfish-py3.appdata.xml

- popd

- %endif

+ 

+ %py3_build

+ 

  

  %install

- cp -a %{name}-%{mainver}*/[A-Z]* .

+ # no idea, but this has to happen first

+ desktop-file-install --dir %{buildroot}%{_datadir}/applications/ \

+ 			build/share/applications/%{name}.desktop

  

- pushd _TMPINSTDIR

- cp -a python2/* $RPM_BUILD_ROOT

- %if %support_python3

- cp -a python3/* $RPM_BUILD_ROOT

- %endif

- popd

+ %py3_install

  

- pushd %{name}-%{mainver}*

+ # for backwards compatibility:

+ ln -s ./catfish %{buildroot}%{_bindir}/catfish-py3

  

  # Install man page manually

- %{__mkdir_p} $RPM_BUILD_ROOT%{_mandir}/man1

- %{__install} -cpm 0644 ./%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/

- %if %support_python3

- %{__install} -cpm 0644 ./%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}-py3.1

- %endif

- 

- popd

+ %{__mkdir_p} %{buildroot}%{_mandir}/man1

+ %{__install} -cpm 0644 ./%{name}.1 %{buildroot}%{_mandir}/man1/

  

  # Remove all unnecessary documentation

- %{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/doc/

+ %{__rm} -rf %{buildroot}%{_datadir}/doc/

  

+ # Language files:

+ %{__mkdir_p} %{buildroot}%{_datadir}/locale/

+ %{__cp} -r build/mo/* %{buildroot}%{_datadir}/locale/

  %{find_lang} %{name}

  

- %files common -f %{name}.lang

- %defattr(-,root,root,-)

+ 

+ %check

+ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop

+ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml

+ 

+ 

+ %files -f %{name}.lang

  %doc AUTHORS

  %doc ChangeLog

  %doc README

  %license COPYING

- 

- %{_datadir}/%{name}/

- %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

- 

- %if 0%{?fedora} >= 28

- %files -n python2-%{name}

- %else

- %files

- %endif

  %{_bindir}/%{name}

- %{_bindir}/%{name}-py2

+ %{_bindir}/%{name}-py3

  %{_mandir}/man1/%{name}.1*

+ %{_datadir}/%{name}/

+ %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

  %{_datadir}/applications/%{name}.desktop

- %{_datadir}/metainfo/%{name}.appdata.xml

- %{python2_sitelib}/%{name}/

- %{python2_sitelib}/%{name}_lib/

- %{python2_sitelib}/%{name}-%{version}-py2*.egg-info

- 

- %if %support_python3

- %files	python3

- %{_bindir}/%{name}-py3

- %{_mandir}/man1/%{name}-py3.1*

- %{_datadir}/applications/%{name}-py3.desktop

- %{_datadir}/metainfo/%{name}-py3.appdata.xml

+ %{_metainfodir}/%{name}.appdata.xml

  %{python3_sitelib}/%{name}/

  %{python3_sitelib}/%{name}_lib/

  %{python3_sitelib}/%{name}-%{version}-py3*.egg-info

- %endif

+ 

  

  %changelog

- * Wed Jan  9 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.4.5-3

- - Rebuilt

+ * Mon Jul 16 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.5-4

+ - Only have one Python version (only the Python 3 implementation is provided)

  

  * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-1.2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

This reverts commit 7ae2507.

... except for the changelog entries.

This is not useful changelog entry for the users. Maybe repeat mine instead?

rebased onto 7c62fde

5 years ago

Let me take a look at this, thank you.

Also, this now needs to be larger. I guess 33.

rebased onto 0a026f6

5 years ago

Metadata Update from @mtasaka:
- Request assigned

5 years ago

Once merged with some packaging fixes. Thank you. (I will keep this ticked open for some days)

Closing now. Thank you for PR.

Pull-Request has been closed by mtasaka

5 years ago
Metadata