forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add make rule for building Arch Linux packages
Added the necessary build infrastructure for building packages compatible with the Arch Linux distribution. As such, one can now run: $ ./configure $ make pkg # Alternatively, one can run 'make arch' as well on the Arch Linux machine to create two binary packages compatible with the pacman package manager, one for the zfs userland utilities and another for the zfs kernel modules. The new packages can then be installed by running: # pacman -U $package.pkg.tar.xz In addition, source-only packages suitable for an Arch Linux chroot environment or remote builder can also be build using the 'sarch' make rule. NOTE: Since the source dist tarball is created on the fly from the head of the build tree, it's MD5 hash signature will be continually influx. As a result, the md5sum variable was intentionally omitted from the PKGBUILD files, and the '--skipinteg' makepkg option is used. This may or may not have any serious security implications, as the source tarball is not being downloaded from an outside source. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#491
- Loading branch information
1 parent
a38718a
commit 6ba3b44
Showing
61 changed files
with
589 additions
and
21 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 |
---|---|---|
|
@@ -15,6 +15,12 @@ | |
|
||
@SET_MAKE@ | ||
|
||
############################################################################### | ||
# Written by Prakash Surya <[email protected]> | ||
############################################################################### | ||
# Build targets for RPM packages. | ||
############################################################################### | ||
|
||
VPATH = @srcdir@ | ||
pkgdatadir = $(datadir)/@PACKAGE@ | ||
pkgincludedir = $(includedir)/@PACKAGE@ | ||
|
@@ -37,11 +43,13 @@ host_triplet = @host@ | |
target_triplet = @target@ | ||
DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ | ||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \ | ||
$(srcdir)/PKGBUILD-zfs-modules.in $(srcdir)/PKGBUILD-zfs.in \ | ||
$(srcdir)/zfs-modules.spec.in \ | ||
$(srcdir)/zfs-script-config.sh.in $(srcdir)/zfs.spec.in \ | ||
$(srcdir)/zfs_config.h.in $(top_srcdir)/config/deb.am \ | ||
$(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \ | ||
$(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ | ||
$(srcdir)/zfs_config.h.in $(top_srcdir)/config/arch.am \ | ||
$(top_srcdir)/config/deb.am $(top_srcdir)/config/rpm.am \ | ||
$(top_srcdir)/config/tgz.am $(top_srcdir)/configure \ | ||
$(top_srcdir)/module/Makefile.in \ | ||
$(top_srcdir)/module/avl/Makefile.in \ | ||
$(top_srcdir)/module/nvpair/Makefile.in \ | ||
$(top_srcdir)/module/unicode/Makefile.in \ | ||
|
@@ -106,8 +114,8 @@ CONFIG_HEADER = zfs_config.h | |
CONFIG_CLEAN_FILES = module/Makefile module/avl/Makefile \ | ||
module/nvpair/Makefile module/unicode/Makefile \ | ||
module/zcommon/Makefile module/zfs/Makefile \ | ||
module/zpios/Makefile zfs.spec zfs-modules.spec \ | ||
zfs-script-config.sh | ||
module/zpios/Makefile zfs.spec zfs-modules.spec PKGBUILD-zfs \ | ||
PKGBUILD-zfs-modules zfs-script-config.sh | ||
CONFIG_CLEAN_VPATH_FILES = | ||
AM_V_GEN = $(am__v_GEN_$(V)) | ||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
|
@@ -212,6 +220,8 @@ GREP = @GREP@ | |
HAVE_ALIEN = @HAVE_ALIEN@ | ||
HAVE_DPKG = @HAVE_DPKG@ | ||
HAVE_DPKGBUILD = @HAVE_DPKGBUILD@ | ||
HAVE_MAKEPKG = @HAVE_MAKEPKG@ | ||
HAVE_PACMAN = @HAVE_PACMAN@ | ||
HAVE_RPM = @HAVE_RPM@ | ||
HAVE_RPMBUILD = @HAVE_RPMBUILD@ | ||
INSTALL = @INSTALL@ | ||
|
@@ -238,6 +248,8 @@ LN_S = @LN_S@ | |
LTLIBOBJS = @LTLIBOBJS@ | ||
MAINT = @MAINT@ | ||
MAKEINFO = @MAKEINFO@ | ||
MAKEPKG = @MAKEPKG@ | ||
MAKEPKG_VERSION = @MAKEPKG_VERSION@ | ||
MKDIR_P = @MKDIR_P@ | ||
NM = @NM@ | ||
NMEDIT = @NMEDIT@ | ||
|
@@ -252,6 +264,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ | |
PACKAGE_STRING = @PACKAGE_STRING@ | ||
PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
PACMAN = @PACMAN@ | ||
PACMAN_VERSION = @PACMAN_VERSION@ | ||
PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
RANLIB = @RANLIB@ | ||
RPM = @RPM@ | ||
|
@@ -354,7 +368,7 @@ all: zfs_config.h | |
.SUFFIXES: | ||
am--refresh: | ||
@: | ||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(am__configure_deps) | ||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(top_srcdir)/config/arch.am $(am__configure_deps) | ||
@for dep in $?; do \ | ||
case '$(am__configure_deps)' in \ | ||
*$$dep*) \ | ||
|
@@ -421,6 +435,10 @@ zfs.spec: $(top_builddir)/config.status $(srcdir)/zfs.spec.in | |
cd $(top_builddir) && $(SHELL) ./config.status $@ | ||
zfs-modules.spec: $(top_builddir)/config.status $(srcdir)/zfs-modules.spec.in | ||
cd $(top_builddir) && $(SHELL) ./config.status $@ | ||
PKGBUILD-zfs: $(top_builddir)/config.status $(srcdir)/PKGBUILD-zfs.in | ||
cd $(top_builddir) && $(SHELL) ./config.status $@ | ||
PKGBUILD-zfs-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-zfs-modules.in | ||
cd $(top_builddir) && $(SHELL) ./config.status $@ | ||
zfs-script-config.sh: $(top_builddir)/config.status $(srcdir)/zfs-script-config.sh.in | ||
cd $(top_builddir) && $(SHELL) ./config.status $@ | ||
|
||
|
@@ -1004,6 +1022,41 @@ tgz-utils: tgz-local rpm-utils | |
|
||
tgz: tgz-modules tgz-utils | ||
|
||
sarch-modules: | ||
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" sarch-common | ||
|
||
sarch-utils: | ||
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" sarch-common | ||
|
||
sarch: sarch-modules sarch-utils | ||
|
||
arch-modules: | ||
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common | ||
|
||
arch-utils: | ||
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common | ||
|
||
arch: arch-modules arch-utils | ||
|
||
arch-local: | ||
@(if test "${HAVE_MAKEPKG}" = "no"; then \ | ||
echo -e "\n" \ | ||
"*** Required util ${MAKEPKG} missing. Please install the\n" \ | ||
"*** package for your distribution which provides ${MAKEPKG},\n" \ | ||
"*** re-run configure, and try again.\n"; \ | ||
exit 1; \ | ||
fi;) | ||
|
||
sarch-common: dist | ||
pkgbuild=PKGBUILD-$(pkg); \ | ||
$(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ | ||
$(MAKEPKG) --allsource --skipinteg --nodeps -p $$pkgbuild || exit 1; | ||
|
||
arch-common: dist | ||
pkgbuild=PKGBUILD-$(pkg); \ | ||
$(MAKE) $(AM_MAKEFLAGS) arch-local || exit 1; \ | ||
$(MAKEPKG) --skipinteg -p $$pkgbuild || exit 1; | ||
|
||
distclean-local:: | ||
-$(RM) -R autom4te*.cache | ||
-find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ | ||
|
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,21 @@ | ||
# Maintainer: Prakash Surya <[email protected]> | ||
pkgname=@ZFS_META_NAME@-modules | ||
pkgver=@ZFS_META_VERSION@ | ||
pkgrel=@ZFS_META_RELEASE@ | ||
pkgdesc="Contains kernel modules and support utilities for the zfs file system." | ||
arch=(x86_64) | ||
url="git://github.com/zfsonlinux/zfs.git" | ||
license=(@ZFS_META_LICENSE@) | ||
depends=('spl-modules') | ||
source=(@ZFS_META_NAME@-@[email protected]) | ||
|
||
build() { | ||
cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ | ||
./configure --with-config=kernel | ||
make | ||
} | ||
|
||
package() { | ||
cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ | ||
make DESTDIR=$pkgdir install | ||
} |
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 @@ | ||
# Maintainer: Prakash Surya <[email protected]> | ||
pkgname=@ZFS_META_NAME@ | ||
pkgver=@ZFS_META_VERSION@ | ||
pkgrel=@ZFS_META_RELEASE@ | ||
pkgdesc="Contains the libzfs library and support utilities for the zfs file system." | ||
arch=(x86_64) | ||
url="git://github.com/zfsonlinux/zfs.git" | ||
license=(@ZFS_META_LICENSE@) | ||
depends=('spl' 'zlib' 'e2fsprogs') | ||
backup=('etc/zfs/zdev.conf') | ||
source=(@ZFS_META_NAME@-@[email protected]) | ||
|
||
build() { | ||
cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ | ||
./configure --with-config=user \ | ||
--prefix=/ \ | ||
--sysconfdir=/etc \ | ||
--libexecdir=/usr/libexec \ | ||
--datadir=/usr/share \ | ||
--includedir=/usr/include \ | ||
--with-udevdir=/lib/udev | ||
make | ||
} | ||
|
||
package() { | ||
cd $srcdir/@ZFS_META_NAME@-@ZFS_META_VERSION@ | ||
make DESTDIR=$pkgdir install | ||
} |
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.