forked from machinekit/machinekit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rpm spec file and patch files generator
Signed-off-by: Damian Wrobel <[email protected]>
- Loading branch information
Showing
4 changed files
with
1,058 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,34 @@ | ||
#!/bin/bash -e | ||
|
||
if ! dnf repolist | grep copr:copr.fedorainfracloud.org:dwrobel:python-Yapps2; then | ||
rpm -qv dnf-plugins-core 2>/dev/null || sudo dnf install dnf-plugins-core | ||
sudo dnf copr enable -y dwrobel/python-Yapps2 | ||
sudo dnf builddep -y linuxcnc.spec | ||
fi | ||
|
||
pushd ../src | ||
|
||
export CFLAGS="-Dcflags -O0 -ggdb3 -fno-gnu89-inline -std=gnu17" | ||
export CXXFLAGS="-Dcxxflags -O0 -ggdb3 -std=c++17" | ||
export CPPFLAGS="-Dcppflags -I/usr/include/readline5 $(pkg-config --cflags python${pv}) -O0 -ggdb3 -Wno-cpp" | ||
#export CPPFLAGS="-Dcppflags -I/usr/include/readline5 $(pkg-config --cflags python${pv}) -O0 -ggdb3 -fsanitize=address -fPIE -fno-omit-frame-pointer" | ||
#ASAN_OPTIONS=halt_on_error=false LD_PRELOAD=/usr/lib64/libasan.so.5 linuxcnc | ||
export LDFLAGS="-L/usr/lib64/readline5" | ||
|
||
export PYTHON=/usr/bin/python3 | ||
|
||
autoreconf -fi . | ||
|
||
export ac_cv_path_CHECKLINK=/usr/bin/true | ||
|
||
./configure \ | ||
--enable-non-distributable=no \ | ||
--with-realtime=uspace \ | ||
|
||
# --enable-build-documentation=pdf | ||
# --enable-non-distributable=yes \ | ||
|
||
make -j$(getconf _NPROCESSORS_ONLN) -O V=1 2>&1 | tee ../fedora/build.log | ||
|
||
#echo "(cd ../src && sudo make setuid -n)" | ||
sudo setcap cap_ipc_lock,cap_net_admin,cap_sys_rawio,cap_sys_nice+ep ../bin/rtapi_app |
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,20 @@ | ||
#!/usr/bin/bash | ||
|
||
set -e | ||
|
||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
rm -f *.patch 2>/dev/null | ||
|
||
# where upstream/master is https://github.com/LinuxCNC/linuxcnc | ||
git format-patch $(git merge-base upstream/master ${BRANCH})..${BRANCH} | ||
|
||
num=1 | ||
|
||
for f in *.patch; do | ||
[ -f "$f" ] || continue | ||
p=${f#*-}; | ||
mv $f linuxcnc-$f; | ||
printf "Patch%s: %%{name}-%s\n" $num $f | ||
num=$((num + 1)) | ||
done |
Oops, something went wrong.