dpdk/pre_checkin.sh
Markos Chandras b800097b2e Accepting request 448772 from home:ndas:branches:network
- Add pre_checkin.sh to generate the dpdk-thunderx.spec file
- Add pre_checkin.sh to generate the dpdk-thunderx.spec file

OBS-URL: https://build.opensuse.org/request/show/448772
OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=23
2017-01-05 09:51:54 +00:00

21 lines
616 B
Bash

#!/bin/sh
# Start fresh
for f in spec changes; do
cp dpdk.$f dpdk-thunderx.$f || exit 1
done
#
#- Add comment about generated file
#- Fix {,sub-}package name, description, summary
#- Enable the dpdk conditional build
sed -i -e "/^Name:.*dpdk$/i \
# Do NOT edit this auto generated file! Edit dpdk.spec instead\n\
# and run 'pre_checkin.sh' before committing" \
-e "/^#\s*spec file/s/dpdk$/&-thunderx/" \
-e "/^Name:/s/dpdk/&-thunderx/g" \
-e "/^Summary:/s/^.*$/&\ \(thunderx\)/g" \
-e "/^%define machine2 armv8a/s/armv8a/thunderx/g" \
-e "/^ExclusiveArch/a Conflicts: dpdk" \
dpdk-thunderx.spec || exit 1