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