Sync from SUSE:SLFO:Main python-pyqt-rpm-macros revision ca3daf118c8932f5d687258f36e65c76
This commit is contained in:
commit
b4573a5e82
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
7
LICENSE
Normal file
7
LICENSE
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
DO WHAT THE HELL YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 1.0.0, October 2014
|
||||||
|
|
||||||
|
DO WHAT THE HELL YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE HELL YOU WANT TO.
|
77
macros.pyqt
Normal file
77
macros.pyqt
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# Documentation: https://en.opensuse.org/openSUSE:Packaging_PyQt_and_SIP
|
||||||
|
|
||||||
|
%sip4_only() %{?use_sip4:%{**}}
|
||||||
|
|
||||||
|
%sip5_only() %{?!use_sip4:%{**}}
|
||||||
|
|
||||||
|
%pyqt5_sipdir %{?use_sip4:%_datadir/sip/PyQt5-%python_bin_suffix}%{?!use_sip4:%python_sitearch/PyQt5/bindings}
|
||||||
|
|
||||||
|
%pyqt6_sipdir %{python_sitearch}/PyQt6/bindings
|
||||||
|
|
||||||
|
%_pyqt_datadir %{?pyqt_build_for_qt6:%{_qt6_datadir}}%{!?pyqt_build_for_qt6:%{_libqt5_datadir}}
|
||||||
|
|
||||||
|
%_pyqt_qmake %{?pyqt_build_for_qt6:%{__qt6_qmake}}%{!?pyqt_build_for_qt6:%{_libqt5_qmake}}
|
||||||
|
|
||||||
|
%pyqt_build(c:m:s:v) \
|
||||||
|
export CXXFLAGS="%{optflags}" \
|
||||||
|
export CFLAGS="%{optflags}" \
|
||||||
|
%{python_expand # \
|
||||||
|
%if 0%{?use_sip4} \
|
||||||
|
mkdir build \
|
||||||
|
pushd build \
|
||||||
|
[ -d ../config-tests ] && ln -s ../config-tests . \
|
||||||
|
[ -d ../sip ] && ln -s ../sip . \
|
||||||
|
$python ../configure.py \\\
|
||||||
|
%{-v:--verbose}%{!-v:-w} \\\
|
||||||
|
--sip=%{_bindir}/sip-%{$python_bin_suffix} \\\
|
||||||
|
--qmake=%{_bindir}/qmake-qt5 \\\
|
||||||
|
%{-c*} \\\
|
||||||
|
QMAKE_CFLAGS+="${CFLAGS} ${CPPFLAGS}" \\\
|
||||||
|
QMAKE_CXXFLAGS+="${CXXFLAGS} ${CPPFLAGS}" \
|
||||||
|
popd \
|
||||||
|
%else \
|
||||||
|
sip-build-%{$python_bin_suffix} \\\
|
||||||
|
--verbose \\\
|
||||||
|
--api-dir %{_pyqt_datadir}/qsci/api/python_%{$python_bin_suffix}/ \\\
|
||||||
|
--no-make \\\
|
||||||
|
--qmake=%{_pyqt_qmake} \\\
|
||||||
|
--qmake-setting "QMAKE_CFLAGS += ${CFLAGS} ${CPPFLAGS}" \\\
|
||||||
|
--qmake-setting "QMAKE_CXXFLAGS += ${CXXFLAGS} ${CPPFLAGS}" \\\
|
||||||
|
%{-s*} \
|
||||||
|
%endif \
|
||||||
|
pushd build \
|
||||||
|
make %{?_smp_mflags} %{-m*} \
|
||||||
|
popd \
|
||||||
|
} \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%pyqt_install \
|
||||||
|
%{python_expand pushd build \
|
||||||
|
%make_install INSTALL_ROOT=%{buildroot} \
|
||||||
|
popd \
|
||||||
|
# move some files when installing PyQt5 packages built with SIP v4\
|
||||||
|
%if 0%{?use_sip4} \
|
||||||
|
[ -d %{buildroot}%{_libqt5_datadir}/qsci/api/python ] \\\
|
||||||
|
&& mv -T %{buildroot}%{_libqt5_datadir}/qsci/api/python \\\
|
||||||
|
%{buildroot}%{_libqt5_datadir}/qsci/api/python_%{$python_bin_suffix} \
|
||||||
|
[ -d %{buildroot}/%{_datadir}/sip/PyQt5 ] \\\
|
||||||
|
&& mv -T %{buildroot}/%{_datadir}/sip/PyQt5 %{buildroot}/%{_datadir}/sip/PyQt5-%{$python_bin_suffix} \
|
||||||
|
%endif \
|
||||||
|
# rename PyQt5 plugins, if any \
|
||||||
|
find %{buildroot}%{_libqt5_plugindir} -name '*pyqt5*.so' \\\
|
||||||
|
| while read f; do mv ${f} ${f/pyqt5/py%{$python_bin_suffix}qt5}; done \
|
||||||
|
# rename PyQt6 plugins, if any \
|
||||||
|
find %{buildroot}%{_qt6_pluginsdir} -name '*pyqt6*.so' \\\
|
||||||
|
| while read f; do mv ${f} ${f/pyqt6/py%{$python_bin_suffix}qt6}; done \
|
||||||
|
} \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%pyqt_install_examples() \
|
||||||
|
%{python_expand # install example files \
|
||||||
|
exdir=%{buildroot}%{_docdir}/%{$python_prefix}-%{1} \
|
||||||
|
mkdir -p $exdir \
|
||||||
|
cp -r examples $exdir/ \
|
||||||
|
find $exdir -name "*.py" -exec sed -i "1 s|^#!%{_bindir}/env python.*$|#!%{_bindir}/$python|" {} \\; \
|
||||||
|
%fdupes $exdir \
|
||||||
|
} \
|
||||||
|
%{nil}
|
47
python-pyqt-rpm-macros.changes
Normal file
47
python-pyqt-rpm-macros.changes
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 1 00:57:18 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Don't use python_module for Recommends.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 26 18:45:28 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- remove the runtime requirement on a specific sip-devel package.
|
||||||
|
Let the package using the macros decide what they need.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 19 23:54:52 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- update to version 0.1
|
||||||
|
- Add PyQt6 support
|
||||||
|
- Add link to wiki in macros file
|
||||||
|
- Remove python-rpm-macros interpreter workaround. The
|
||||||
|
inconsistency never made it into a released package.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 2 16:55:14 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- remove --debug flag for sip v5 builds. Mitigates boo#1179214
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 24 11:03:47 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Fix shebang replacement in pyqt_install_examples
|
||||||
|
gh#openSUSE/python-rpm-macros#66
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 5 11:15:04 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- update to version 0.0.3
|
||||||
|
* Use wiki page as URL
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 23 22:20:18 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- update to version 0.0.2
|
||||||
|
* runtime requirement: fdupes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 3 20:49:21 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- initial version 0.0.1
|
48
python-pyqt-rpm-macros.spec
Normal file
48
python-pyqt-rpm-macros.spec
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-pyqt-rpm-macros
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: python-pyqt-rpm-macros
|
||||||
|
Version: 0.1
|
||||||
|
Release: 0
|
||||||
|
Summary: RPM macros for building PyQt packages
|
||||||
|
License: WTFPL
|
||||||
|
URL: https://en.opensuse.org/openSUSE:Packaging_PyQt_and_SIP
|
||||||
|
Source0: macros.pyqt
|
||||||
|
Source1: LICENSE
|
||||||
|
Requires: fdupes
|
||||||
|
Requires: python-rpm-macros
|
||||||
|
Recommends: python3-sip-devel
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package provides some macros for using SIP v[456] to build PyQt[56] packages
|
||||||
|
|
||||||
|
%prep
|
||||||
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||||
|
install -m 644 %{SOURCE0} %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.pyqt
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user