commit 6e7828c622568a39e794a489a71bd314dbcda62f Author: Jay Larson Date: Tue May 29 11:02:21 2018 -0500 First check in diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..760b477 --- /dev/null +++ b/Makefile @@ -0,0 +1,158 @@ +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation here: +# (http://www.gnu.org/licenses/gpl-2.0.html) +# +# This program 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. + +# Some, but not all of variables are required. The following list +# describes the required variables: +# +# * URL: The main website of the upstream project +# * REPO: The location of the package on the source pacakge +# server. This might be one of core, main, dev, or +# perhaps others. +# * BRIEF: Short description, should be 50 chars or less +# * SNAPVER: This is the package version. When a package is +# changed, but no changes are made to the source code +# this value should be increased. This would include +# things like usher being modified, changes to default +# configuration files, file permissions, etc. +# * ARCHIVE: The default commands that set this variable should +# work in most cases, but in some cases it may need +# to be modified. This variable should contain the +# path to the source of the package (./SRC/filename) +# * TYPE: This is probably not really needed due to the +# ability of gnu tar to figure it out on its own. +# Should probably be removed at some point. +# * SRCDIR: This is the name of the source directory after the +# package source is extracted. The default command +# should in most cases set this automatically. +# * PATCHDIR: This directory should be ./SRC/patches and is +# required, whether or not patches are used. +# * VERSION: This should be set automatically based on the +# version string in the source directory and SNAPVER. +# The default command here should work in many cases, +# but certain packages may need to use a different +# method. +# +# Variables that aren't required: +# +# * ARCH: This should be populated for packages which contain +# compiled binaries. If it is not populated the ARCH +# will be set to 'noarch'. +# * DEPENDS: If any other packages are required for this package +# to function then they need to be listed here, +# preferably in alphabetical order. +# * BUILDDEPS: Any package beyond packages from the core repo +# need to be listed here. The idea is that we +# can automate building and testing packages +# from clean core systems. The core repo is +# intended to include only the base minimum +# packages which provide a functional system. +# * SRCPKG: By default this is populated automatically with +# the name of the package (current directory). If +# the source package is used to generate multiple +# packages then this variable should contain the +# name of the git repo that tracks the source. +# * DESC: This is to be used to provide a longer description +# of the package. + +export SRCPKG = libuv +export DEPENDS = glibc +export ARCH = x86_64 +export URL = http://libuv.org/ +BUILDDEPS = +REPO = main +BRIEF = support library with a focus on asynchronous I/O +DESC = libuv is a multi-platform support library with a focus on \ +asynchronous I/O +SNAPVER = 0 + +ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) +TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') +SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//') +PATCHDIR := $(PWD)/SRC/patches +export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-v[0-9].*'| \ + sed 's/^-v//')-$(SNAPVER) + +include /usr/share/snap/Makefile.snaplinux + +DEV := $(PWD)/libuv-dev +DEVROOT := $(DEV)/ROOT + +$(SRCDIR)/autogen.sh: $(ARCHIVE) + @if [ '$(TYPE)' == 'application/x-bzip2' ]; then \ + tar -jxf $(ARCHIVE); \ + elif [ '$(TYPE)' == 'application/x-gzip' ]; then \ + tar -zxf $(ARCHIVE); \ + elif [ '$(TYPE)' == 'application/x-tar' ]; then \ + tar -xf $(ARCHIVE); \ + elif [ '$(TYPE)' == 'application/x-xz' ]; then \ + tar -xf $(ARCHIVE); \ + else \ + echo 'Unable to determine archive type'; \ + exit 1; \ + fi + @touch $(SRCDIR)/autogen.sh + +$(SRCDIR)/configure: $(SRCDIR)/autogen.sh + cd $(SRCDIR) && ./autogen.sh + +$(SRCDIR)/config.log: $(SRCDIR)/configure + @cd $(SRCDIR) && \ + for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \ + patch --verbose -Np1 -i $$patch; \ + done + @cd $(SRCDIR); \ + ./configure \ + --prefix=/usr \ + --build=x86_64-snap-linux-gnu \ + --host=x86_64-snap-linux-gnu \ + --target=x86_64-snap-linux-gnu + +# binfile should be replaced with a file generated by the +# make process. It won't really break anything if not +# set to a valid file, but the source make process will +# be re-executed even if it isn't necessary + +$(SRCDIR)/binfile: $(SRCDIR)/config.log + @cd $(SRCDIR) && make + +$(ROOT): $(SRCDIR)/binfile + @if [ -d $(ROOT) ]; then \ + touch $(ROOT); \ + else \ + mkdir -v $(ROOT); \ + fi + + @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ + install -v -d -m 0755 $(ROOT)/lib && \ + mv -v $(ROOT)/usr/lib/libuv.so.* $(ROOT)/lib && \ + ln -svf ../../lib/$$(readlink $(ROOT)/usr/lib/libuv.so) \ + $(ROOT)/usr/lib/libuv.so + install -v -d $(DEV)/SNAP && \ + install -v -d $(DEVROOT) && \ + for file in `find $(ROOT)| \ + egrep 'pkgconfig\/|\.a$$|\.h$$|\.la$$|\.pc$$'`; do \ + path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \ + mkdir -p $$path; \ + mv $$file $$path; \ + done + find $(ROOT) -type d -empty -delete && \ + cd $(DEV) && make -f ../Makefile.libuv-dev && mv *.snap ../ + +test: $(ROOT) + @cd $(SRCDIR) && make check + +clean: + @rm -rvf $(ROOT) \ + $(DEV) \ + $(SNAPINFO) \ + $(MANIFEST) \ + $(FILES) \ + $(SRCDIR) + diff --git a/Makefile.libuv-dev b/Makefile.libuv-dev new file mode 100644 index 0000000..825e2ec --- /dev/null +++ b/Makefile.libuv-dev @@ -0,0 +1,16 @@ +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation here: +# (http://www.gnu.org/licenses/gpl-2.0.html) +# +# This program 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. + +DEPENDS = libuv +REPO = dev +BRIEF = Development files for libuv +DESC = Development files for libuv + +include /usr/share/snap/Makefile.snaplinux diff --git a/SNAP/README b/SNAP/README new file mode 100644 index 0000000..cb756b1 --- /dev/null +++ b/SNAP/README @@ -0,0 +1,5 @@ +This is the directory where the manifest, snapinfo, +and files.tar.gz files will be created. It is also +where the usher file should be placed if it is +required by the package. Any other files that need +to be included could also be placed here. diff --git a/SRC/libuv-v1.20.3.tar.gz b/SRC/libuv-v1.20.3.tar.gz new file mode 100644 index 0000000..cb42675 Binary files /dev/null and b/SRC/libuv-v1.20.3.tar.gz differ diff --git a/SRC/libuv-v1.20.3.tar.gz.sign b/SRC/libuv-v1.20.3.tar.gz.sign new file mode 100644 index 0000000..3775917 --- /dev/null +++ b/SRC/libuv-v1.20.3.tar.gz.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Comment: GPGTools - https://gpgtools.org + +iQIcBAABCgAGBQJa8NNiAAoJEP9H1eSti0/c9QsP/01xzbwfr9FGA3UqlAtmGsfR +5VqsEuuJTUyiExO8h1/uCpmqGxi91cg5tytxVstZNQE56YUDZfK+zAE7c8nGL+vv ++bCdkEcc+XeoUKOkCF7UUPuzvLGiiuHePfrM5dpmqk9hfpU/91tdhYt8IZiS1bix +kZHoJH+Qs1M4hnRi7YQUTJypV7ozto6tqNVMz3olyLuj2ac2edtqPev/UBPotO4y +BivbZ9JNVl/t+9OphNeFtMWCc4cJ16lLCoMVmH8CSYbiWT9KvXTKuYk/6KYnYc+t +v1IDEsUTTGz4p8GWki0p79FNCaNl4IQYDEPiJgD6WUeCse8n8s07B19YFmY5bkpu +BcLVa3k54fUN7GKZelATtbM/7s+ZTv7mYs1bn5/0dUXm/N359YBKu1k9rlovu+6n +U6Ct+2pdxt7sOoka/3aXUNDlRMpvL/8xTeAa3QlfcZF3R0Ia5j9HwIFNzD3sfe00 +iqdupV99zHS/f/m7HSRJXENpe9L32RlUZWbPnJ00ZmlnQvU4PRDf6VHDSZnXnOcr +vH6X7gXylpM7xoK82DOnhlbPXSfCSeDkFKmiIfTT5zl1KL9lpdvCaigCHOLuN/8Y +rzg1nxMcL3VgwqPWujTsdt4rNsRojocdZVMQOFBHK0JaLCil16c1/dm0POlFNWb2 +yPsONtp4yDP1UFyZQ6ZA +=Xpww +-----END PGP SIGNATURE----- diff --git a/SRC/patches/README b/SRC/patches/README new file mode 100644 index 0000000..976577a --- /dev/null +++ b/SRC/patches/README @@ -0,0 +1,3 @@ +Place any patch files here and preface each with a +number indicating the order of execution. Patch +files are expected to use a .patch extension.