PavolVican | 5d37752 | 2017-06-07 15:08:14 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
PavolVican | 6fd3e27 | 2017-06-20 17:46:55 +0200 | [diff] [blame] | 3 | LOCAL_LC_TIME=$LC_TIME |
| 4 | export LC_TIME="en_US.UTF-8" |
PavolVican | 5d37752 | 2017-06-07 15:08:14 +0200 | [diff] [blame] | 5 | mkdir -p debian/source |
| 6 | mkdir -p debs |
| 7 | cp build-packages/debian.rules debian/rules |
| 8 | cp build-packages/debian.control debian/control |
| 9 | echo '9' >debian/compat |
Michal Vasko | ef4eb9f | 2018-10-23 09:50:00 +0200 | [diff] [blame] | 10 | echo '3.0 (quilt)' >debian/source/format |
PavolVican | 5d37752 | 2017-06-07 15:08:14 +0200 | [diff] [blame] | 11 | cp "@PROJECT_SOURCE_DIR@/LICENSE" debian/copyright |
Michal Vasko | ef4eb9f | 2018-10-23 09:50:00 +0200 | [diff] [blame] | 12 | if [[ `lsb_release -rs` == "14.04" ]] |
| 13 | then |
| 14 | cp "@PROJECT_SOURCE_DIR@/packages/debian.libyang.install.ubuntu-14.04" debian/@PACKAGE_NAME@.install |
| 15 | else |
| 16 | cp "@PROJECT_SOURCE_DIR@/packages/debian.libyang.install" debian/@PACKAGE_NAME@.install |
| 17 | fi |
PavolVican | 6fd3e27 | 2017-06-20 17:46:55 +0200 | [diff] [blame] | 18 | cp "@PROJECT_SOURCE_DIR@/packages/debian.libyang-dev.install" debian/@PACKAGE_NAME@-dev.install |
PavolVican | 8738eee | 2018-02-27 01:47:02 +0100 | [diff] [blame] | 19 | cp "@PROJECT_SOURCE_DIR@/packages/debian.libyang-cpp.install" debian/libyang-cpp@PACKAGE_PART_NAME@.install |
| 20 | cp "@PROJECT_SOURCE_DIR@/packages/debian.libyang-cpp-dev.install" debian/libyang-cpp@PACKAGE_PART_NAME@-dev.install |
| 21 | cp "@PROJECT_SOURCE_DIR@/packages/debian.python3-yang.install" debian/python3-yang@PACKAGE_PART_NAME@.install |
PavolVican | 5d37752 | 2017-06-07 15:08:14 +0200 | [diff] [blame] | 22 | echo -e "@PACKAGE_NAME@ (@LIBYANG_VERSION@) stable; urgency=low\n" >debian/changelog |
| 23 | git log -10 --pretty=format:' * %s (%aN)%n' 2>/dev/null >>debian/changelog || echo -e " * unknown changes \n" >>debian/changelog |
| 24 | git log -1 --pretty=format:'%n -- %aN <%aE> %aD%n' >>debian/changelog 2>/dev/null || echo " -- ${USER} <${USER}@`hostname`> `date -R`" >>debian/changelog |
| 25 | debuild --no-lintian -i -b -us -uc |
| 26 | mv ../*.deb debs |
PavolVican | 6fd3e27 | 2017-06-20 17:46:55 +0200 | [diff] [blame] | 27 | export LC_TIME=$LOCAL_LC_TIME |