diff --git a/Makefile b/Makefile index 5e71d2238ae8cc8181903bdedc2f48a76f86cb8f..e7dbbd69c3588cfc2efbb95557945d382f889d38 100755 --- a/Makefile +++ b/Makefile @@ -71,6 +71,7 @@ install: @echo "END INSTALL A-Tune" rpm: - git archive --format=tar --prefix=A-Tune/ HEAD | gzip -9 > openeuler-A-Tune-v$(VERSION).tar.gz - mv openeuler-A-Tune-v$(VERSION).tar.gz ~/rpmbuild/SOURCES + cd .. && tar -zcvf openeuler-A-Tune-v$(VERSION).tar.gz A-Tune + mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} + mv ../openeuler-A-Tune-v$(VERSION).tar.gz ~/rpmbuild/SOURCES rpmbuild -ba misc/atune.spec diff --git a/misc/atune.spec b/misc/atune.spec index 65491d1a04f11aa32245dc3280bc2e5904a30a19..8960d483f41b822b8c03f87432cc02cc63c3ca8d 100755 --- a/misc/atune.spec +++ b/misc/atune.spec @@ -53,17 +53,10 @@ Requires: python3-pandas atune engine tool for manage atuned AI tuning system. %prep -%setup -n A-Tune -q +%autosetup -n A-Tune -p1 %build -cd ../ -mkdir -p gopath/src/ -rm -rf gopath/src/%{name} -mv A-Tune gopath/src/%{name} -cd gopath/src/%{name} -make -cd ../ -cp -rf %{name} ../../A-Tune +%make_build %install %make_install @@ -113,8 +106,8 @@ cp -rf %{name} ../../A-Tune %attr(0750,root,root) /usr/libexec/atuned/analysis/* %attr(0750,root,root) /etc/atuned/* %exclude /usr/libexec/atuned/analysis/app.py -%exclude /usr/libexec/atuned/plugin/ -%exclude /usr/libexec/atuned/atuned/ +%exclude /usr/libexec/atuned/analysis/plugin/ +%exclude /usr/libexec/atuned/analysis/atuned/ %attr(0750,root,root) %dir /usr/libexec/atuned/analysis %attr(0640,root,root) %dir /etc/atuned