2015-10-13 14:57:28 +02:00
|
|
|
#
|
|
|
|
# spec file for package qhexedit2
|
|
|
|
#
|
2020-06-24 09:56:42 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2015-10-13 14:57:28 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-16 18:12:03 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-10-13 14:57:28 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-01-10 11:03:11 +01:00
|
|
|
%define _libver 4
|
2015-10-13 14:57:28 +02:00
|
|
|
Name: qhexedit2
|
2020-08-17 09:36:41 +02:00
|
|
|
Version: 0.8.9
|
2015-10-13 14:57:28 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Qt-based hex editor
|
2018-12-12 13:11:55 +01:00
|
|
|
License: LGPL-2.0-only
|
2015-10-13 14:57:28 +02:00
|
|
|
Group: Development/Tools/Other
|
2018-12-12 13:11:55 +01:00
|
|
|
URL: https://github.com/Simsys/qhexedit2
|
2015-10-13 14:57:28 +02:00
|
|
|
Source0: https://github.com/Simsys/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
Source1: qhexedit.desktop
|
|
|
|
BuildRequires: ImageMagick
|
2017-01-10 11:03:11 +01:00
|
|
|
BuildRequires: desktop-file-utils
|
2015-10-13 14:57:28 +02:00
|
|
|
BuildRequires: fdupes
|
2017-01-10 11:03:11 +01:00
|
|
|
BuildRequires: gcc-c++ >= 4.8
|
|
|
|
BuildRequires: pkgconfig
|
2015-10-13 14:57:28 +02:00
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
|
|
BuildRequires: pkgconfig(Qt5Widgets)
|
|
|
|
|
|
|
|
%description
|
|
|
|
QHexEdit is a hex editor widget written in C++ for the Qt framework.
|
|
|
|
It is a simple editor for binary data, just like QPlainTextEdit is for text
|
|
|
|
data.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Libraries/C and C++
|
2016-11-14 19:02:28 +01:00
|
|
|
Requires: libqhexedit%{_libver} = %{version}-%{release}
|
2015-10-13 14:57:28 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and header files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation and examples for %{name}
|
2016-06-20 07:37:35 +02:00
|
|
|
Group: Documentation/HTML
|
2015-10-13 14:57:28 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
The %{name}-doc package contains the documentation and examples for %{name}.
|
|
|
|
|
2016-11-09 09:26:45 +01:00
|
|
|
%package -n libqhexedit%{_libver}
|
2015-10-13 14:57:28 +02:00
|
|
|
Summary: Qt5 %{name} library
|
2016-11-07 23:40:56 +01:00
|
|
|
Group: System/Libraries
|
2015-10-13 14:57:28 +02:00
|
|
|
|
2016-11-09 09:26:45 +01:00
|
|
|
%description -n libqhexedit%{_libver}
|
2015-10-13 14:57:28 +02:00
|
|
|
Qt5 library for %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir build-lib
|
|
|
|
pushd build-lib
|
|
|
|
qmake-qt5 QMAKE_CXXFLAGS="%{optflags}" ../src/qhexedit.pro
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Build application
|
|
|
|
mkdir build-example
|
|
|
|
pushd build-example
|
|
|
|
qmake-qt5 QMAKE_CXXFLAGS="%{optflags}" ../example/qhexedit.pro
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
|
|
|
# Library and headers
|
|
|
|
install -d %{buildroot}%{_includedir}/%{name}
|
|
|
|
cp -a src/*.h %{buildroot}%{_includedir}/%{name}
|
|
|
|
install -d %{buildroot}%{_libdir}
|
|
|
|
chmod 0755 build-lib/*.so.*.*
|
|
|
|
cp -a build-lib/*.so* %{buildroot}%{_libdir}
|
|
|
|
|
|
|
|
# pkg-config files
|
|
|
|
install -d %{buildroot}%{_libdir}/pkgconfig/
|
|
|
|
|
|
|
|
cat > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc <<EOF
|
|
|
|
libdir=%{_libdir}
|
|
|
|
includedir=%{_includedir}/%{name}
|
|
|
|
|
|
|
|
Name: %{name}
|
|
|
|
Version: %{version}
|
|
|
|
Description: %{summary}
|
|
|
|
Cflags: -I\${includedir}
|
|
|
|
Libs: -L\${libdir} -lqhexedit
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Application
|
|
|
|
install -Dpm 0755 build-example/qhexedit %{buildroot}%{_bindir}/qhexedit
|
|
|
|
desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ %{SOURCE1}
|
|
|
|
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/qhexedit.desktop
|
|
|
|
|
|
|
|
# Fix docs
|
|
|
|
%fdupes -s doc/html
|
|
|
|
|
2016-04-07 17:11:39 +02:00
|
|
|
# Install icon
|
2015-10-13 14:57:28 +02:00
|
|
|
install -d %{buildroot}%{_datadir}/pixmaps
|
2017-05-02 19:12:23 +02:00
|
|
|
convert -strip doc/html/qhexedit.png -resize 128x128! %{buildroot}%{_datadir}/pixmaps/qhexedit.png
|
2015-10-13 14:57:28 +02:00
|
|
|
|
|
|
|
%post
|
|
|
|
%desktop_database_post
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%desktop_database_postun
|
|
|
|
|
2016-11-09 09:26:45 +01:00
|
|
|
%post -n libqhexedit%{_libver} -p /sbin/ldconfig
|
2015-10-13 14:57:28 +02:00
|
|
|
|
2016-11-09 09:26:45 +01:00
|
|
|
%postun -n libqhexedit%{_libver} -p /sbin/ldconfig
|
2015-10-13 14:57:28 +02:00
|
|
|
|
|
|
|
%files
|
2018-12-12 13:11:55 +01:00
|
|
|
%license src/license.txt
|
|
|
|
%doc readme.md
|
2015-10-13 14:57:28 +02:00
|
|
|
%{_bindir}/qhexedit
|
|
|
|
%{_datadir}/applications/qhexedit.desktop
|
|
|
|
%{_datadir}/pixmaps/qhexedit.png
|
|
|
|
|
|
|
|
%files doc
|
2018-12-12 13:11:55 +01:00
|
|
|
%license src/license.txt
|
|
|
|
%doc doc/html readme.md
|
2015-10-13 14:57:28 +02:00
|
|
|
|
2016-11-09 09:26:45 +01:00
|
|
|
%files -n libqhexedit%{_libver}
|
2018-12-12 13:11:55 +01:00
|
|
|
%license src/license.txt
|
|
|
|
%doc doc/release.txt
|
2016-11-09 09:26:45 +01:00
|
|
|
%{_libdir}/libqhexedit.so.%{_libver}*
|
2015-10-13 14:57:28 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_libdir}/libqhexedit.so
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
%changelog
|