PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | LOCAL_LC_TIME=$LC_TIME |
| 4 | export LC_TIME="en_US.UTF-8" |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 5 | cd "@PROJECT_SOURCE_DIR@" && tar --exclude="@EXCLUDE_BUILD_DIR@" --exclude=./.git* -zcvf "@PROJECT_BINARY_DIR@/master.tar.gz" . --transform 's/./@PACKAGE@-master/' |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 6 | cd @PROJECT_BINARY_DIR@ |
| 7 | mkdir -p rpms/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp} |
Michal Vasko | 4cb2d72 | 2020-04-23 13:49:16 +0200 | [diff] [blame] | 8 | mv master.tar.gz rpms/SOURCES |
| 9 | sed -e '7d' build-packages/@PACKAGE@.spec > rpms/SPECS/@PACKAGE@.spec |
| 10 | git log -1 --date=format:'%a %b %d %Y' --pretty=format:"* %ad %aN <%aE>" 2>/dev/null >>rpms/SPECS/@PACKAGE@.spec || printf "* `date +"%a %b %d %Y"` ${USER} <${USER}@`hostname`>" >>rpms/SPECS/@PACKAGE@.spec |
| 11 | echo " @LIBNETCONF2_VERSION@" >>rpms/SPECS/@PACKAGE@.spec |
| 12 | git log -10 --pretty=format:"- %s (%aN)" >>rpms/SPECS/@PACKAGE@.spec 2>/dev/null || echo "- unknown changes" >>rpms/SPECS/@PACKAGE@.spec |
| 13 | rpmbuild --ba rpms/SPECS/@PACKAGE@.spec --define "%_topdir @PROJECT_BINARY_DIR@/rpms" |
PavolVican | 384786e | 2017-07-12 15:31:20 +0200 | [diff] [blame] | 14 | export LC_TIME=$LOCAL_LC_TIME |