Browse Source

version and release automatized

0.6-dev
root 3 years ago
parent
commit
a67bbcc340
12 changed files with 27 additions and 90 deletions
  1. +3
    -6
      .drone.yml
  2. +1
    -0
      RELEASE
  3. +1
    -0
      VERSION
  4. +17
    -0
      build-deb.sh
  5. +0
    -5
      debian/changelog
  6. +0
    -1
      debian/compat
  7. +0
    -10
      debian/control
  8. +0
    -7
      debian/copyright
  9. +0
    -41
      debian/postrm
  10. +0
    -15
      debian/rules
  11. +2
    -2
      lch
  12. +3
    -3
      lch.spec

+ 3
- 6
.drone.yml View File

@ -9,7 +9,7 @@ steps:
sonar_host: https://sonar.hatthieves.es
sonar_token:
from_secret: sonar_token
sources: ./
sources: .
- name: Build Ubuntu deb package
image: ubuntu
@ -17,12 +17,9 @@ steps:
- name: deb_packages
path: /debian
commands:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update && apt-get install -y dpkg-dev debhelper
- dpkg-buildpackage -us -uc
- cp ../*.deb .
- ./build-deb.sh
- dpkg -i *.deb
- rm -rf /debian/* && cp *.deb /debian
- cp *.deb /debian && rm *.deb
- lch -v
- name: Build CentOS rpm package


+ 1
- 0
RELEASE View File

@ -0,0 +1 @@
10

+ 1
- 0
VERSION View File

@ -0,0 +1 @@
0.6

+ 17
- 0
build-deb.sh View File

@ -0,0 +1,17 @@
#!/bin/bash
VERSION=$(cat VERSION)r$(cat RELEASE)
mkdir -p "lch-$VERSION/DEBIAN"
echo -e "Package: lch
Version: $VERSION
Architecture: all
Maintainer: HatThieves <webmaster@hatthieves.es>
Depends: bash
Homepage: https://lch.hatthieves.es
Description: LCH - Linux Compressor Humanizer" > "lch-$VERSION/DEBIAN/control"
mkdir -p "lch-$VERSION/usr/bin" "lch-$VERSION/usr/lib/lch" "lch-$VERSION/usr/share/man/man1"
cp ./lch "lch-$VERSION/usr/bin"
cp -r ./lib/* "lch-$VERSION/usr/lib/lch"
gzip ./man/lch.1 -c > "lch-$VERSION/usr/share/man/man1/lch.1.gz"
chmod 644 "lch-$VERSION/usr/share/man/man1/lch.1.gz"
dpkg -b "lch-$VERSION"
rm -rf "lch-$VERSION"

+ 0
- 5
debian/changelog View File

@ -1,5 +0,0 @@
lch (0.6.10) unstable; urgency=medium
* Initial release.
-- Pedro Berrocal <pberr@hatthieves.es> Sun, 04 Oct 2020 00:51:43 +0200

+ 0
- 1
debian/compat View File

@ -1 +0,0 @@
10

+ 0
- 10
debian/control View File

@ -1,10 +0,0 @@
Source: lch
Maintainer: Pedro Berrocal <pberr@hatthieves.es>
Standards-Version: 0.6.10
Section: utils
Build-Depends: debhelper (>= 10.2.5)
Package: lch
Architecture: all
Description: Linux Compressor Humanizer
Download it and forget about writing arguments.

+ 0
- 7
debian/copyright View File

@ -1,7 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: falcot-data
Files: *
Copyright: 2004-2019 Hatthieves
License:
All rights reserved.

+ 0
- 41
debian/postrm View File

@ -1,41 +0,0 @@
#!/usr/bin/env bash
if [ "$UID" != "0" ]; then
echo " Only root can execute this script, sorry."
echo " Try 'sudo $0'"
exit 0
fi
# Si existe el archivo lch
if [[ -f "/usr/bin/lch" ]]; then
rm /usr/bin/lch
fi
# Si existe el directorio lch
if [[ -d "/usr/lib/lch" ]]; then
rm -rf "/usr/lib/lch"
fi
# Si existe man
if [ -x "$(command -v man)" ]; then
# Si nulo manpath
if [ -z "$MANPATH" ]; then
MANPATH=$(manpath)
fi
MANDIR=${MANPATH%%:*}/man1
# Si man lch.1
if [[ -f "$MANDIR/lch.1" ]]; then
rm "$MANDIR/lch.1"
fi
# Si man lch.1.gz
if [[ -f "$MANDIR/lch.1.gz" ]]; then
rm "$MANDIR/lch.1.gz"
fi
fi
echo "=============================="
echo " lch uninstalled successfully."
echo -e "==============================\n"

+ 0
- 15
debian/rules View File

@ -1,15 +0,0 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_usrlocal:
override_dh_auto_install:
./bin/install.sh
configure:
clean:
dh_autoreconf_clean
dh_clean

+ 2
- 2
lch View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERSION=0.6r10
VERSION=$(cat VERSION)r$(cat RELEASE)
DEST=$1
shift 1
ORIG=$@
@ -47,4 +47,4 @@ else
;;
esac
exit 0
fi
fi

+ 3
- 3
lch.spec View File

@ -6,8 +6,8 @@
#
Summary: Linux Compress Humanizer
Name: lch
Version: 0.6
Release: 10
Version: %(cat "$PWD/VERSION")
Release: %(cat "$PWD/RELEASE")
License: GPL
URL: https://lch.hatthieves.es
Group: System
@ -16,7 +16,7 @@ Requires: bash
BuildRoot: ./rpmbuild/
# Build with the following syntax:
# rpmbuild --target noarch -bb utils.spec
# rpmbuild --target noarch -bb lch.spec
%description
Linux Compress Humanizer


Loading…
Cancel
Save