From f0c4c6917e20fc70656d824f29c0791e3976fca9 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:09:37 +0100 Subject: [PATCH 01/10] lsof: Remove spaces from blank lines --- lsof-4.87-0.bee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lsof-4.87-0.bee b/lsof-4.87-0.bee index 0d8095455..eb2274cd9 100755 --- a/lsof-4.87-0.bee +++ b/lsof-4.87-0.bee @@ -24,9 +24,9 @@ mee_build() { mee_install() { mkdir -pv ${D}{${SBINDIR},${MANDIR}/man8} - + install -m 755 lsof ${D}${SBINDIR} install -m 644 lsof.8 ${D}${MANDIR}/man8 - + } From 3c8db3fdff9cbbbc1a786a27ab8f3b26cf4afc28 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:09:59 +0100 Subject: [PATCH 02/10] lsof: Remove blank line at end of file --- lsof-4.87-0.bee | 1 - 1 file changed, 1 deletion(-) diff --git a/lsof-4.87-0.bee b/lsof-4.87-0.bee index eb2274cd9..b0f81a403 100755 --- a/lsof-4.87-0.bee +++ b/lsof-4.87-0.bee @@ -29,4 +29,3 @@ mee_install() { install -m 644 lsof.8 ${D}${MANDIR}/man8 } - From 146fbf1ae9fdeaefd478460eb0b10becf980daa7 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:14:27 +0100 Subject: [PATCH 03/10] lsof: Use current bee file template Recreate the bee file with the command below, and adapt it according to the old bee files. ``` $ bee init -f -o lsof-4.87-0.bee ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.87.tar.bz2 creating lsof-4.87-0.bee from template '/etc/default/bee/templates/fallback' ``` --- lsof-4.87-0.bee | 71 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/lsof-4.87-0.bee b/lsof-4.87-0.bee index b0f81a403..7729c4e71 100755 --- a/lsof-4.87-0.bee +++ b/lsof-4.87-0.bee @@ -1,16 +1,54 @@ -#!/bin/env beesh +#!/usr/bin/env beesh -PGRP=( uncategorized ) +## this file was created by bee init and should be executed to build a +## bee-package. (Additional hints are located at the end of this file.) -SRCURL[0]="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.87.tar.bz2" +############################################################################### +## The source URL(s) define the location of the sources that will be +## downloaded. Version variables may be used to simplify reuse of this bee-file. -PATCHES[0]="" +SRCURL[0]="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PKGVERSION}.tar.bz2" -# EXCLUDE="" +############################################################################### +## Add URLs/pathes to patch files to the PATCHURL array. +## The sources will be patched in the order of the array. -B=${S} +# PATCHURL+=() + +############################################################################### +## Add filename patterns to the EXCLUDE array of files that should not +## be added to you package but may be present in the image directory. + +# EXCLUDE+=() + +############################################################################### +## Uncomment the next statement, if the software may not be able to be built +## outside the source directory and needs to be built inside the source +## directory. + +build_in_sourcedir + +############################################################################### +## bee cannot detect buildtypes specified in subdirectories. +## Sometimes packages "hide" the real sources in a subdirectory named +## 'src' or 'cmake' or .. +## use 'sourcesubdir_append' to specify this directory if known. + +# sourcesubdir_append src + + +############################################################################### +## Change the default (auto-detected) steps to +## extract, patch, configure/setup, build and install the software. +## Make sure the mee_install function does install everything to the +## image directory "${D}" + +#mee_extract() { +# bee_extract "${@}" +#} mee_patch() { + bee_patch "${@}" gtar --strip-components 1 -xof lsof_4.87_src.tar } @@ -19,7 +57,7 @@ mee_configure() { } mee_build() { - make + make } mee_install() { @@ -29,3 +67,22 @@ mee_install() { install -m 644 lsof.8 ${D}${MANDIR}/man8 } +## by default this may be 'make install DESTDIR="${D}"' + +############################################################################### +## +## Additional hints: +## +## The name of this bee-file should follow the following naming convention: +## pkgname-pkgversion-pkgrevision.bee +## +## You may remove all comments as long as SRCURL[0] is set. +## +## Everything in this file will be executed in a bash environment. +## +## Build the package by executing +## './pkg-version-N.bee' or +## 'beesh ./pkg-version-N.bee' +## +## see http://beezinga.org/ +## From 59628ba13fe29d00fb2f090690036b9582da981a Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:32:50 +0100 Subject: [PATCH 04/10] lsof: Remove unneeded blank line --- lsof-4.87-0.bee | 1 - 1 file changed, 1 deletion(-) diff --git a/lsof-4.87-0.bee b/lsof-4.87-0.bee index 7729c4e71..7770f3641 100755 --- a/lsof-4.87-0.bee +++ b/lsof-4.87-0.bee @@ -65,7 +65,6 @@ mee_install() { install -m 755 lsof ${D}${SBINDIR} install -m 644 lsof.8 ${D}${MANDIR}/man8 - } ## by default this may be 'make install DESTDIR="${D}"' From afa71a4528d8fcfb09bc83c6729b511386fc4f7e Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:33:17 +0100 Subject: [PATCH 05/10] lsof: Install into `BINDIR` instead of `SBINDIR` There is no reason to have it in `SBINDIR`. The Linux From Scratch book also installs it into `/usr/bin`. --- lsof-4.87-0.bee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lsof-4.87-0.bee b/lsof-4.87-0.bee index 7770f3641..3e8e6af81 100755 --- a/lsof-4.87-0.bee +++ b/lsof-4.87-0.bee @@ -61,9 +61,9 @@ mee_build() { } mee_install() { - mkdir -pv ${D}{${SBINDIR},${MANDIR}/man8} + mkdir -pv ${D}{${BINDIR},${MANDIR}/man8} - install -m 755 lsof ${D}${SBINDIR} + install -m 755 lsof ${D}${BINDIR} install -m 644 lsof.8 ${D}${MANDIR}/man8 } ## by default this may be 'make install DESTDIR="${D}"' From bad6e0baf43737ed1f49d6aa171ed29a877913c9 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:34:31 +0100 Subject: [PATCH 06/10] lsof: Convert to versionless bee file --- lsof-4.87-0.bee => lsof.be0 | 2 ++ 1 file changed, 2 insertions(+) rename lsof-4.87-0.bee => lsof.be0 (99%) diff --git a/lsof-4.87-0.bee b/lsof.be0 similarity index 99% rename from lsof-4.87-0.bee rename to lsof.be0 index 3e8e6af81..17a75c3bc 100755 --- a/lsof-4.87-0.bee +++ b/lsof.be0 @@ -1,5 +1,7 @@ #!/usr/bin/env beesh +# BEE_VERSION lsof-4.87-0 + ## this file was created by bee init and should be executed to build a ## bee-package. (Additional hints are located at the end of this file.) From be4b174cef2a29192c3a81ccf82a2861fd79dcf3 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:42:47 +0100 Subject: [PATCH 07/10] lsof: Use bee variable `PKGVERSION` Do not hard code the version to make updates easier. --- lsof.be0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsof.be0 b/lsof.be0 index 17a75c3bc..f026ab0a5 100755 --- a/lsof.be0 +++ b/lsof.be0 @@ -51,7 +51,7 @@ build_in_sourcedir mee_patch() { bee_patch "${@}" - gtar --strip-components 1 -xof lsof_4.87_src.tar + gtar --strip-components 1 -xof lsof_${PKGVERSION}_src.tar } mee_configure() { From 9a214c9bffbafd864f3ecfd86e133f0dcb9bb5c7 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:36:06 +0100 Subject: [PATCH 08/10] lsof: Update version from 4.87 to 4.90 The change-log is available online [1]. [1]: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ChangeLog --- lsof.be0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsof.be0 b/lsof.be0 index f026ab0a5..ed7b45415 100755 --- a/lsof.be0 +++ b/lsof.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION lsof-4.87-0 +# BEE_VERSION lsof-4.90-0 ## this file was created by bee init and should be executed to build a ## bee-package. (Additional hints are located at the end of this file.) From d2663277a467347f5705bbf358a20098818c0016 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 16:50:59 +0100 Subject: [PATCH 09/10] lsof: Pass `BEE_MAKEFLAGS` to `make` Prepend `start_cmd` to log the invocation. --- lsof.be0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsof.be0 b/lsof.be0 index ed7b45415..9be88c74e 100755 --- a/lsof.be0 +++ b/lsof.be0 @@ -59,7 +59,7 @@ mee_configure() { } mee_build() { - make + start_cmd make ${BEE_MAKEFLAGS} } mee_install() { From f686e28b44b8eb0f466561c3aac6387cb235102e Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 22 Feb 2018 17:17:09 +0100 Subject: [PATCH 10/10] Revert "lsof: Install into `BINDIR` instead of `SBINDIR`" This reverts commit afa71a4528d8fcfb09bc83c6729b511386fc4f7e. I was told, some paths are hard-coded, so keep it in `/usr/sbin`. --- lsof.be0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lsof.be0 b/lsof.be0 index 9be88c74e..ff613e35f 100755 --- a/lsof.be0 +++ b/lsof.be0 @@ -63,9 +63,9 @@ mee_build() { } mee_install() { - mkdir -pv ${D}{${BINDIR},${MANDIR}/man8} + mkdir -pv ${D}{${SBINDIR},${MANDIR}/man8} - install -m 755 lsof ${D}${BINDIR} + install -m 755 lsof ${D}${SBINDIR} install -m 644 lsof.8 ${D}${MANDIR}/man8 } ## by default this may be 'make install DESTDIR="${D}"'