-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from garlick/debbuild
add test deb packaging and fix misc build problems
- Loading branch information
Showing
23 changed files
with
167 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
#!/bin/sh | ||
echo "Running aclocal ... " | ||
aclocal -I config | ||
echo "Running libtoolize ... " | ||
libtoolize --force --automake --copy | ||
echo "Running autoheader ... " | ||
autoheader | ||
echo "Running automake ... " | ||
automake --copy --add-missing | ||
echo "Running autoconf ... " | ||
autoconf | ||
echo "Cleaning up ..." | ||
mv aclocal.m4 config/ | ||
rm -rf autom4te.cache | ||
|
||
# | ||
# Run an extra libtoolize before autoreconf to ensure that | ||
# libtool macros can be found if libtool is in PATH, but its | ||
# macros are not in default aclocal search path. | ||
# | ||
echo "Running libtoolize --automake --copy ... " | ||
libtoolize --automake --copy || exit | ||
echo "Running autoreconf --force --verbose --install" | ||
autoreconf --force --verbose --install || exit | ||
echo "Now run ./configure." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Source: powerman | ||
Section: devel | ||
Priority: optional | ||
Maintainer: Jim Garlick <garlick.jim@gmail.com> | ||
Standards-Version: 4.1.2 | ||
Build-Depends: | ||
debhelper (>= 10), | ||
bison, | ||
flex, | ||
libsnmp-dev, | ||
libcurl4-gnutls-dev, | ||
libgenders-dev | ||
|
||
Homepage: https://github.com/chaos/powerman | ||
Package: powerman | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends} | ||
Description: Power Control Utility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Files: * | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: powerman | ||
Source: <https://github.com/chaos/powerman> | ||
|
||
Files: * | ||
Copyright: 2001 The Regents of the University of California | ||
Copyright: 2007 Lawrence Livermore National Security, LLC | ||
License: GPL-2+ | ||
|
||
Files: debian/* | ||
Copyright: 2024 Jim Garlick <garlick.jim@gmail.com> | ||
License: GPL-3+ | ||
This package is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
. | ||
This package is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/> | ||
. | ||
On Debian systems, the complete text of the GNU General | ||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
README.Debian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/make -f | ||
# See debhelper(7) (uncomment to enable) | ||
# output every command that modifies files on the build system. | ||
#export DH_VERBOSE = 1 | ||
|
||
# see FEATURE AREAS in dpkg-buildflags(1) | ||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
|
||
# see ENVIRONMENT in dpkg-buildflags(1) | ||
# package maintainers to append CFLAGS | ||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic | ||
# package maintainers to append LDFLAGS | ||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed | ||
|
||
%: | ||
dh $@ | ||
|
||
override_dh_auto_configure: | ||
dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --with-tcp-wrappers --with-genders --with-httppower --with-redfishpower --with-snmppower | ||
|
||
override_dh_autoreconf: | ||
@echo not running autogen.sh on dist product | ||
|
||
override_dh_auto_install: | ||
dh_auto_install | ||
find . -name '*.la' -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (quilt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
PACKAGE=powerman | ||
USER=$(git config --get user.name) | ||
DEBFULLNAME=$USER | ||
EMAIL=$(git config --get user.email) | ||
DEBEMAIL=$EMAIL | ||
|
||
SRCDIR=${1:-$(pwd)} | ||
|
||
die() { echo "debbuild: $@" >&2; exit 1; } | ||
log() { echo "debbuild: $@"; } | ||
|
||
test -z "$USER" && die "User name not set in git-config" | ||
test -z "$EMAIL" && die "User email not set in git-config" | ||
|
||
log "Running make dist" | ||
make dist >/dev/null || exit 1 | ||
|
||
log "Building package from latest dist tarball" | ||
tarball=$(ls -tr *.tar.gz | tail -1) | ||
version=$(echo $tarball | sed "s/${PACKAGE}-\(.*\)\.tar\.gz/\1/") | ||
|
||
rm -rf debbuild | ||
mkdir -p debbuild && cd debbuild | ||
|
||
mv ../$tarball . | ||
|
||
log "Unpacking $tarball" | ||
tar xvfz $tarball >/dev/null | ||
|
||
log "Creating debian directory and files" | ||
cd ${PACKAGE}-${version} | ||
cp -a ${SRCDIR}/debian . || die "failed to copy debian dir" | ||
|
||
export DEBEMAIL DEBFULLNAME | ||
log "Creating debian/changelog" | ||
dch --create --package=$PACKAGE --newversion $version build tree release | ||
|
||
log "Running debian-buildpackage -b" | ||
dpkg-buildpackage -b | ||
log "Check debbuild directory for results" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
apt install \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
make \ | ||
bison \ | ||
flex \ | ||
libsnmp-dev \ | ||
libcurl4-gnutls-dev \ | ||
libgenders-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.