summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiyu Yan <yanqiyu01@gmail.com>2020-06-15 16:40:55 +0800
committerQiyu Yan <yanqiyu01@gmail.com>2020-06-15 16:40:55 +0800
commitda59c5fc99aeb78de582e40ac4799087b1e72e94 (patch)
treeab86b7f82da18704f4365edae36c29027f0d9f2a
parentda8263ab5438cbc0f75f7ef3314b53810fbaaf47 (diff)
downloadgeant4-rpmbuild-da59c5fc99aeb78de582e40ac4799087b1e72e94.tar.gz
geant4-rpmbuild-da59c5fc99aeb78de582e40ac4799087b1e72e94.tar.xz
geant4-rpmbuild-da59c5fc99aeb78de582e40ac4799087b1e72e94.zip
override optflags for upstream suggested flags
-rw-r--r--README.md8
-rw-r--r--geant4.spec10
2 files changed, 10 insertions, 8 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..069d5c4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+A unoffical Geant4 build for Fedora.
+
+[![Copr build status](https://copr.fedorainfracloud.org/coprs/yanqiyu/geant4/package/geant4/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/yanqiyu/geant4/package/geant4/)
+
+``` Bash
+sudo dnf enable yanqiyu/geant4
+sudo dnf install geant4 geant4-devel geant4-data
+``` \ No newline at end of file
diff --git a/geant4.spec b/geant4.spec
index 9ba42df..45d38a2 100644
--- a/geant4.spec
+++ b/geant4.spec
@@ -12,6 +12,8 @@
%define G4INCL_version 1.0
%define G4ENSDFSTATE_version 2.2
+%global optflags %(echo %{optflags} | sed 's/-O[0-3]/-O3 -flto -fno-fat-lto-objects -DNDEBUG -fno-trapping-math -ftree-vectorize -fno-math-errno/ ')
+
Name: geant4
Version: 10.06.p01
Release: 5%{?dist}
@@ -102,14 +104,6 @@ Geant4 datasets.
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
-str='%optflags'
-str=${str/-O2/-O3}
-CXXFLAGS=${str}' -flto -ffat-lto-objects -DNDEBUG -fno-trapping-math -ftree-vectorize -fno-math-errno'
-export CXXFLAGS
-LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
-export LDFLAGS
-LT_SYS_LIBRARY_PATH=/usr/lib64:
-export LT_SYS_LIBRARY_PATH
%{cmake} -DGEANT4_BUILD_MULTITHREADED=ON \
-DGEANT4_INSTALL_DATA=OFF \
-DGEANT4_USE_GDML=ON \