Added Fedora packaging spec
This commit is contained in:
@@ -22,6 +22,19 @@ dput ppa:bkryza/clang-uml *.changes
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Fedora
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -v $PWD:$PWD fedora:37 bash
|
||||||
|
dnf install fedora-packager rpmdevtools gcc cmake git clang-devel clang-tools-extra ccache yaml-cpp llvm-devel wget
|
||||||
|
rpmdev-setuptree
|
||||||
|
cd /root/rpmbuild/SOURCES
|
||||||
|
wget https://github.com/bkryza/clang-uml/archive/refs/heads/v0.3.0.zip
|
||||||
|
cd /root/rpmbuild/SPECS/
|
||||||
|
wget https://raw.githubusercontent.com/bkryza/clang-uml/v0.3.0/packaging/fedora/clang-uml.spec
|
||||||
|
rpmbuild -ba clang-uml.spec
|
||||||
|
```
|
||||||
|
|
||||||
## Anaconda
|
## Anaconda
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
62
packaging/fedora/clang-uml.spec
Normal file
62
packaging/fedora/clang-uml.spec
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# %define git_version %(git describe --tags --always --abbrev=7)
|
||||||
|
%define _unpackaged_files_terminate_build 0
|
||||||
|
|
||||||
|
Name: clang-uml
|
||||||
|
Version: 0.3.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: C++ UML diagram generator based on Clang
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: https://github.com/bkryza/clang-uml
|
||||||
|
Source0: https://github.com/bkryza/clang-uml/archive/refs/heads/v%{version}.zip
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: clang-devel
|
||||||
|
BuildRequires: clang-tools-extra
|
||||||
|
BuildRequires: ccache
|
||||||
|
BuildRequires: yaml-cpp-devel
|
||||||
|
BuildRequires: llvm-devel
|
||||||
|
|
||||||
|
Requires: clang
|
||||||
|
Requires: yaml-cpp
|
||||||
|
|
||||||
|
Requires(post): info
|
||||||
|
Requires(preun): info
|
||||||
|
|
||||||
|
%description
|
||||||
|
clang-uml is an automatic C++ to UML class, sequence, package and include
|
||||||
|
diagram generator, driven by YAML configuration files. The main idea behind the
|
||||||
|
project is to easily maintain up-to-date diagrams within a code-base or
|
||||||
|
document legacy code. The configuration file or files for clang-uml define the
|
||||||
|
type and contents of each generated diagram. Currently the diagrams are
|
||||||
|
generated in PlantUML format.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n clang-uml-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-Wno-nonnull -Wno-stringop-overflow" -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON -DCMAKE_INSTALL_PREFIX=%{_exec_prefix} -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DGIT_VERSION=%{version} -DBUILD_TESTS=OFF
|
||||||
|
make %{_smp_mflags} clang-uml
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
rm -f %{buildroot}/%{_infodir}/dir
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 = 0 ] ; then
|
||||||
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_bindir}/clang-uml
|
||||||
|
|
||||||
|
%doc CHANGELOG.md README.md
|
||||||
|
%license LICENSE.md
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Jan 01 2023 Bartek Kryza <bkryza@gmail.com>
|
||||||
|
- Initial version of the package for Fedora
|
||||||
Reference in New Issue
Block a user