%global pkgvers 1 %global scdate0 20201214 %global schash0 0b46cdb80b1611d9f83bd393151db73367d0458c %global branch0 master %global source0 https://github.com/The-OpenROAD-Project/def.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: def Version: 5.8 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Library Exchange Format License: GPLv3 URL: https://github.com/The-OpenROAD-Project/def BuildRequires: make gcc-c++ cmake git bison zlib-devel %global __cmake_in_source_build 1 %description Library Exchange Format %package devel Summary: Development files for def Requires: %{name} = %{version}-%{release} %description devel This package contains development files for def %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build #sed -i -e 's|STATIC|SHARED|' CMakeLists.txt sed -i -e 's|DESTINATION lib)|DESTINATION %{_lib})|' CMakeLists.txt mkdir build pushd build %cmake .. \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo %cmake_build popd %install pushd build %cmake_install rm -rf %{buildroot}%{_includedir}/lex.h popd %files %license LICENSE.TXT %doc lefdefReadme.txt doc %{_libdir}/*.so %files devel %{_includedir}/* %changelog * Sat Jul 25 2020 Cristian Balint - github update releases