2022-07-21 10:56:46 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-08-12 15:21:04 +03:00
|
|
|
cd ../
|
2022-07-21 10:56:46 +03:00
|
|
|
|
|
|
|
VERSION=$(grep Version projman.tcl | grep -oE '\b[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\b')
|
2022-11-28 13:30:01 +03:00
|
|
|
RELEASE=$(grep Release projman.tcl | grep -oE '[0-9A-Za-z]+$')
|
2022-08-12 15:21:04 +03:00
|
|
|
BUILD_DATE=$(date +%d%m%Y%H%M%S)
|
|
|
|
TXT="# Build: ${BUILD_DATE}"
|
2022-11-28 13:30:01 +03:00
|
|
|
echo "$VERSION, $RELEASE, $BUILD_DATE"
|
2022-08-12 15:21:04 +03:00
|
|
|
sed -i "/# Build:.*/c$TXT" projman.tcl
|
2022-07-21 10:56:46 +03:00
|
|
|
|
2022-07-21 14:08:56 +03:00
|
|
|
cp projman.tcl projman
|
2024-08-22 11:04:37 +03:00
|
|
|
cp changelog-gen.tcl changelog-gen
|
2022-07-21 10:56:46 +03:00
|
|
|
|
2024-08-22 13:38:52 +03:00
|
|
|
./changelog-gen.tcl --project-name projman --project-version ${VERSION} --project-release ${RELEASE} --out-file debian/changelog --deb --last
|
2022-08-12 15:21:04 +03:00
|
|
|
|
2022-07-21 10:56:46 +03:00
|
|
|
sed -i "s+^set\ dir(lib)+set\ dir(lib)\ /usr/share/projman/lib ;#+g" projman
|
|
|
|
|
|
|
|
sed -i "s+\[pwd\]+/usr/share/projman+g" projman
|
2022-08-12 15:21:04 +03:00
|
|
|
|
|
|
|
|
2022-07-21 10:56:46 +03:00
|
|
|
tar czf ../projman_${VERSION}.orig.tar.gz .
|
|
|
|
|
2024-06-26 16:22:29 +03:00
|
|
|
dpkg-buildpackage -d
|
2022-07-21 10:56:46 +03:00
|
|
|
|
|
|
|
#cp ../projman_${VERSION}-${RELEASE}_amd64.deb /files/
|
|
|
|
|
2024-08-22 11:04:37 +03:00
|
|
|
rm -v projman changelog-gen
|
2022-11-09 14:54:38 +03:00
|
|
|
rm -r -v debian/{projman,.debhelper}
|