-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #41
- Loading branch information
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Name: CXXGraph | ||
Version: 0.1 | ||
Release: 4%{?dist} | ||
Summary: Header-Only C++ Library for Graph Representation and Algorithms | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
Prefix:/usr | ||
|
||
License: AGPLv3.0 | ||
URL: https://github.com/ZigRazor/CXXGraph | ||
Source0: https://github.com/ZigRazor/CXXGraph/archive/refs/tags/v0.1.4.tar.gz | ||
|
||
#Requires: bash | ||
|
||
BuildArch: noarch | ||
|
||
%define _topdir %(echo $PWD)/ | ||
%description | ||
Header-Only C++ Library for Graph Representation, Manipulation, Partitioning and Algorithms | ||
|
||
%precd rm | ||
echo " |------------------------------------------------| " | ||
echo " |------------ CXXGraph Library --------------| " | ||
echo " |------------------------------------------------| " | ||
|
||
|
||
%prep | ||
cd %{_topdir} | ||
#%{_topdir}/../targzip.sh | ||
../targzip.sh | ||
|
||
%build | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
mkdir -p %{buildroot}%{prefix}/include | ||
cp -rp %{_topdir}/../../include/* %{buildroot}%{prefix}/include/ | ||
|
||
echo " |------------------------------------------------| " | ||
echo " |-------- Installation Completed ------------| " | ||
echo " |------------------------------------------------| " | ||
|
||
%preun | ||
echo " |------------------------------------------------| " | ||
echo " |------------ CXXGraph Library --------------| " | ||
echo " |------------------------------------------------| " | ||
|
||
%postun | ||
rm -rf /usr/include/Graph.hpp /usr/include/CXXGraphConfig.h | ||
echo " |------------------------------------------------| " | ||
echo " |------- Uninstallation Completed -----------| " | ||
echo " |------------------------------------------------| " | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%files | ||
%defattr(-,root,root) | ||
%{prefix}/include | ||
|
||
%changelog | ||
* Mon Jul 26 2021 ZigRazor <zigrazor@gmail.com> - 0.1-4 | ||
- First RPM package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
rm -rf BUILD RPMS SOURCES SRPMS #clean directories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
#Clean | ||
./clean_rpm.sh | ||
|
||
#Prepare Directories | ||
|
||
mkdir BUILD | ||
mkdir RPMS | ||
mkdir SOURCES | ||
mkdir SRPMS | ||
|
||
#Build RPMs | ||
|
||
rpmbuild -ba SPECS/CXXGraph.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
tar -cvzf SOURCES/v0.1.4.tar.gz ../../include/* |