@@ -35,6 +35,7 @@ COMMIT ?= $(shell git rev-parse HEAD)
3535BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
3636SOURCE_ARCHIVE ?= $(NAME ) -$(VERSION ) .tar.$(TAR_EXT )
3737SOURCE_ARCHIVE_DEB ?= $(NAME ) -$(VERSION ) -$(REBUILD ) .tar.$(TAR_EXT )
38+ SOURCE_ARCHIVE_RPM ?= $(NAME ) -$(VERSION ) .tar.$(TAR_EXT )
3839CONDA_TOKEN ?=
3940
4041#
@@ -61,11 +62,36 @@ _BUILD/$(SOURCE_ARCHIVE):
6162
6263_BUILD/$(SOURCE_ARCHIVE_DEB ) :
6364 echo " ############################"
64- echo " Creating source archive from latest commit $( COMMIT) - $( SOURCE_ARCHIVE) "
65+ echo " Creating source archive for DEB from latest commit $( COMMIT) - $( SOURCE_ARCHIVE) "
6566 echo " ############################"
6667 mkdir -p $(build_dir )
6768 git-archive-all --prefix=$(NAME ) -$(VERSION ) -$(REBUILD ) / _BUILD/$(SOURCE_ARCHIVE_DEB )
6869
70+ _BUILD/$(SOURCE_ARCHIVE_RPM ) :
71+ echo " ############################"
72+ echo " Creating source archive for RPM from latest commit $( COMMIT) - $( SOURCE_ARCHIVE) "
73+ echo " ############################"
74+ mkdir -p $(build_dir )
75+ git archive --format=tar.gz --prefix=$(NAME ) -$(VERSION ) / v$(VERSION ) > _BUILD/$(NAME ) -$(VERSION ) .tar.gz
76+
77+
78+ rpm :
79+ echo " ############################"
80+ echo " Creating rpm package for $( OS) $( DIST) "
81+ echo " Creating directory: " , $(build_dir ) /$(NAME ) -$(VERSION )
82+ echo " Extracting source archive..."
83+ echo " ############################"
84+ # rm -rf $(build_dir)
85+ mkdir -p $(build_dir )
86+ dnf install -y fedora-packager rpmdevtools gcc cmake git clang-devel clang-tools-extra ccache yaml-cpp llvm-devel wget yaml-cpp-devel
87+ rpmdev-setuptree
88+ cp $(build_dir ) /$(SOURCE_ARCHIVE_RPM ) /root/rpmbuild/SOURCES/
89+ cp fedora/clang-uml.spec /root/rpmbuild/SPECS/
90+ rpmbuild -ba --define ' git_version ${VERSION}' /root/rpmbuild/SPECS/clang-uml.spec
91+ cp /root/rpmbuild/RPMS/x86_64/* $(build_dir )
92+ cp /root/rpmbuild/SRPMS/* $(build_dir )
93+
94+
6995deb : _BUILD/$(SOURCE_ARCHIVE_DEB )
7096 echo " ############################"
7197 echo " Creating deb source package for $( OS) $( DIST) "
0 commit comments