First check in of mdadm
This commit is contained in:
124
Makefile
Normal file
124
Makefile
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
ARCH = x86_64
|
||||||
|
DEPENDS = glibc
|
||||||
|
BUILDDEPS =
|
||||||
|
SRCPKG = mdadm
|
||||||
|
URL = https://kernel.org/pub/linux/utils/raid/mdadm/
|
||||||
|
REPO = main
|
||||||
|
BRIEF = Manage MD devices aka Linux Software RAID
|
||||||
|
DESC = mdadm is a tool for creating, managing, and monitoring RAID devices \
|
||||||
|
using the md driver in Linux.
|
||||||
|
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
|
||||||
|
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
||||||
|
|
||||||
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
|
$(SRCDIR)/Makefile: $(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)/Makefile
|
||||||
|
|
||||||
|
$(SRCDIR)/mdadm: $(SRCDIR)/Makefile
|
||||||
|
@cd $(SRCDIR) && \
|
||||||
|
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
|
||||||
|
patch --verbose -Np1 -i $$patch; \
|
||||||
|
done
|
||||||
|
@cd $(SRCDIR) && make
|
||||||
|
|
||||||
|
$(ROOT): $(SRCDIR)/mdadm
|
||||||
|
@if [ -d $(ROOT) ]; then \
|
||||||
|
touch $(ROOT); \
|
||||||
|
else \
|
||||||
|
mkdir -v $(ROOT); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
|
||||||
|
|
||||||
|
test: $(ROOT)
|
||||||
|
@cd $(SRCDIR); \
|
||||||
|
make check
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rvf $(ROOT) \
|
||||||
|
$(SNAPINFO) \
|
||||||
|
$(MANIFEST) \
|
||||||
|
$(FILES) \
|
||||||
|
$(SRCDIR)
|
||||||
|
|
||||||
5
SNAP/README
Normal file
5
SNAP/README
Normal file
@@ -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.
|
||||||
16
SRC/mdadm-4.1.tar.sign
Normal file
16
SRC/mdadm-4.1.tar.sign
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQIcBAABAgAGBQJb0w/uAAoJEDl9guBTGpyRDlkQAJLUEonrbuuMlZBycCRzOcie
|
||||||
|
JIFny+/Ca1tKllM8I8ifzf8nbRLhxe2hY0H6WBTxCwCsxxjwrFu2TAgiYfZEmZyv
|
||||||
|
BKuAbBW3tqDx9E03Jky0fHuNnhlcDLtQw0MGozjb70v2YiqYNFQWBOWXiKrZCxCB
|
||||||
|
E9xTqqKSOSDkv0551/IopS9S7GaXor4FGfSd0PfwI9uwCelaj/SqV1sDMs91QfbB
|
||||||
|
9Tk5u2kqdbEBHDXl8Xd2o9q7QtpO+DQMD2+I193xi5YIs1IL0XSOCQ+K5APJ+QnP
|
||||||
|
fDDqX5sBF8ADvNvGVE2dVMQhKpNxPBWcP9AhQwceZqbHIo9W5Gbin9WZ5+o+J4Z8
|
||||||
|
PTt+isqOhedIsdS5dcsLiSsxdJjOzdILavBKhwSCWVrnqXNtnqDwqCG2mFBj/bTu
|
||||||
|
08X1dKguGhqRUyA5Qi+JRWzdg+B6h8ufZUYO+B28N0Mo0iyAbJKn+gbANk5oSOrB
|
||||||
|
KjPflUI9ePJ6s12DB/V+0oy5ztT55MkAHC4me7DRc2PhFYNEu1yZR6DuqN9BD0Vw
|
||||||
|
bL2L2l7js7IocgYEF+s2raJUpdytO8xKGw4eMgm/xqBDtzq+91Y6bGWTAhjhol73
|
||||||
|
E5x3fw4YNlk6mxQ8JwM5E5Xjb7LShPeaqp5njnp1V4unm3PzoCDhw/8aQJdFp1vI
|
||||||
|
JfrVqp66RSXED3+mvgGe
|
||||||
|
=wkeH
|
||||||
|
-----END PGP SIGNATURE-----
|
||||||
BIN
SRC/mdadm-4.1.tar.xz
Normal file
BIN
SRC/mdadm-4.1.tar.xz
Normal file
Binary file not shown.
3
SRC/patches/README
Normal file
3
SRC/patches/README
Normal file
@@ -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.
|
||||||
Reference in New Issue
Block a user