1+ Name: CXXGraph
2+ Version: 0.1
3+ Release: 4%{?dist }
4+ Summary: Header-Only C++ Library for Graph Representation and Algorithms
5+ BuildRoot: %{_tmppath }/%{name }-%{version }-%{release }-root
6+ Prefix: /usr
7+
8+ License: AGPLv3.0
9+ URL: https://github.com/ZigRazor/CXXGraph
10+ Source0: https://github.com/ZigRazor/CXXGraph/archive/refs/tags/v0.1.4.tar.gz
11+
12+ #Requires: bash
13+
14+ BuildArch: noarch
15+
16+ %define _topdir %(echo $PWD)/
17+ %description
18+ Header-Only C++ Library for Graph Representation, Manipulation, Partitioning and Algorithms
19+
20+ %pre cd rm
21+ echo " |------------------------------------------------| "
22+ echo " |------------ CXXGraph Library --------------| "
23+ echo " |------------------------------------------------| "
24+
25+
26+ %prep
27+ cd %{_topdir }
28+ #%{_topdir}/../targzip.sh
29+ ../targzip.sh
30+
31+ %build
32+
33+ %install
34+ rm -rf %{buildroot }
35+ mkdir -p %{buildroot }%{prefix }/include
36+ cp -rp %{_topdir }/../../include/* %{buildroot }%{prefix }/include/
37+
38+ echo " |------------------------------------------------| "
39+ echo " |-------- Installation Completed ------------| "
40+ echo " |------------------------------------------------| "
41+
42+ %preun
43+ echo " |------------------------------------------------| "
44+ echo " |------------ CXXGraph Library --------------| "
45+ echo " |------------------------------------------------| "
46+
47+ %postun
48+ rm -rf /usr/include/Graph.hpp /usr/include/CXXGraphConfig.h
49+ echo " |------------------------------------------------| "
50+ echo " |------- Uninstallation Completed -----------| "
51+ echo " |------------------------------------------------| "
52+
53+ %clean
54+ rm -rf %{buildroot }
55+
56+ %files
57+ %defattr(-,root,root)
58+ %{prefix }/include
59+
60+ %changelog
61+ * Mon Jul 26 2021 ZigRazor <zigrazor@gmail.com> - 0.1-4
62+ - First RPM package
0 commit comments