Switch to new package format
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
name: ntp
|
||||||
|
description: Network Time Protocol implementation
|
||||||
|
version: 4.2.8p18
|
||||||
|
revision: 3
|
||||||
|
url: https://www.ntp.org/
|
||||||
|
license: custom
|
||||||
|
maintainers:
|
||||||
|
- [email protected]
|
||||||
|
architecture: any
|
||||||
|
type: source
|
||||||
|
keep:
|
||||||
|
- etc/ntp.conf
|
||||||
|
depends:
|
||||||
|
- libcap
|
||||||
|
- libedit
|
||||||
|
- openssl
|
||||||
|
- perl
|
||||||
|
- sysusers
|
||||||
|
downloads:
|
||||||
|
- url: https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${BPM_PKG_VERSION%.*}/ntp-${BPM_PKG_VERSION}.tar.gz
|
||||||
|
extract_to: ${BPM_SOURCE}
|
||||||
|
extract_strip_components: 1
|
||||||
|
checksum: cf84c5f3fb1a295284942624d823fffa634144e096cfc4f9969ac98ef5f468e5
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
name: ntp
|
|
||||||
description: Network Time Protocol implementation
|
|
||||||
version: 4.2.8p18
|
|
||||||
revision: 2
|
|
||||||
url: https://www.ntp.org/
|
|
||||||
license: custom
|
|
||||||
architecture: any
|
|
||||||
depends: ["libcap","libedit","openssl","perl","sysusers"]
|
|
||||||
keep: ["etc/ntp.conf"]
|
|
||||||
type: source
|
|
||||||
+7
-15
@@ -1,18 +1,16 @@
|
|||||||
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
DOWNLOAD="https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${BPM_PKG_VERSION%.*}/ntp-${BPM_PKG_VERSION}.tar.gz"
|
|
||||||
FILENAME="${DOWNLOAD##*/}"
|
|
||||||
|
|
||||||
# The prepare function is executed in the root of the temp directory
|
# The prepare function is executed in the root of the temp directory
|
||||||
# This function is used for downloading files and putting them into the correct location
|
# This function is used for putting downloaded files to the correct location or applying patches
|
||||||
prepare() {
|
prepare() {
|
||||||
wget "$DOWNLOAD"
|
cd "$BPM_SOURCE"
|
||||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
# Fix errors
|
||||||
|
sed -i 's/getclock/getclock memchr/' sntp/m4/ntp_libntp.m4
|
||||||
|
sed -i 's/pthread_detach(NULL)/pthread_detach(0)/' sntp/m4/openldap-thread-check.m4
|
||||||
|
|
||||||
# Fix pthread_detach configure error
|
autoreconf -fi
|
||||||
sed -e "s;pthread_detach(NULL);pthread_detach(0);" -i "$BPM_SOURCE"/configure "$BPM_SOURCE"/sntp/configure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# The build function is executed in the source directory
|
# The build function is executed in the source directory
|
||||||
@@ -29,12 +27,6 @@ build() {
|
|||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
# The check function is executed in the source directory
|
|
||||||
# This function is used to run tests to verify the package has been compiled correctly
|
|
||||||
check() {
|
|
||||||
make check
|
|
||||||
}
|
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
diff -Nru a/sntp/m4/openldap-thread-check.m4 b/sntp/m4/openldap-thread-check.m4
|
||||||
|
--- a/sntp/m4/openldap-thread-check.m4 2024-05-19 18:38:30 +0000
|
||||||
|
+++ b/sntp/m4/openldap-thread-check.m4 2024-05-19 18:38:30 +0000
|
||||||
|
@@ -262,10 +262,8 @@
|
||||||
|
dnl save the flags
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#include <pthread.h>
|
||||||
|
-#ifndef NULL
|
||||||
|
-#define NULL (void*)0
|
||||||
|
-#endif
|
||||||
|
-]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
|
||||||
|
+pthread_t thread;
|
||||||
|
+]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
|
||||||
|
])
|
||||||
|
|
||||||
|
if test $ol_cv_func_pthread_detach = no ; then
|
||||||
Reference in New Issue
Block a user