File pycdc-git.spec of Package pycdc-git
#
# spec file for package pycdc-git
#
# Copyright (c) 2024 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/
#
%define realname pycdc
Name: pycdc-git
Version: 1.0.0~git20240214.0a50980
Release: 0
Summary: C++ python bytecode disassembler and decompiler
License: GPL
URL: https://github.com/zrax/pycdc
BuildRequires: binutils-gold
BuildRequires: cmake
BuildRequires: gcc-c++
Source0: %{realname}-%{version}.tar.xz
%description
C++ python bytecode disassembler and decompiler.
%prep
%autosetup -p1 -n %{realname}-%{version}
%build
mkdir -p build;
export CC=gcc
export CXX=g++
cmake -B build -DCMAKE_BUILD_TYPE='None' -DCMAKE_INSTALL_PREFIX='/usr' -Wno-dev;
make -C build
%install
install -Dm755 -t "%{buildroot}/usr/bin/" "build/pycdc";
install -Dm755 -t "%{buildroot}/usr/bin/" "build/pycdas";
install -Dm644 -t "%{buildroot}/usr/share/licenses/%{realname}" %{_builddir}/%{realname}-%{version}/LICENSE
%files
%dir %{_datadir}/licenses/%{realname}
%{_bindir}/pycdas
%{_bindir}/pycdc
%{_datadir}/licenses/%{realname}/LICENSE
%changelog