--define="_prefix $(prefix)" -tb $(distdir).tar.gz \
&& echo "RPMs successfully generated in $(build_dir)/RPMS"
+debs:
+ pkgversion=$$(echo @PACKAGE_VERSION@ | tr '_' '-'); \
+ liperelease=$$(echo @LIPE_RELEASE@ | tr '_' '-'); \
+ cversion=$$(sed -ne '1s/^lipe-lpcc (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog); \
+ if [ "$$pkgversion-$$liperelease" != "$$cversion" ]; then \
+ echo -e "1i\nlipe-lpcc ($$pkgversion-$$liperelease) unstable; urgency=low\n\n * Automated changelog entry update\n\n -- Minh Diep <mdiep@whamcloud.com> $$(date -R)\n\n.\nwq" | ed debian/changelog; \
+ fi; \
+ rm -rf debs; \
+ dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp
+ VER=$$(sed -ne '1s/^lipe-lpcc (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \
+ mkdir -p debs && \
+ mv ../lipe-lpcc_$${VER}_*.deb \
+ ../lipe-lpcc_$${VER}_*.changes \
+ ../lipe-lpcc_$${VER}.dsc \
+ debs/
+
lipe-$(PACKAGE_VERSION).x86_64.iso: rpms
@if test -z "$(CACHED_ISO_PATH)"; then \
echo -e "Error: Can not build ISO without the cached ISO path," \
AC_MSG_CHECKING([for distro version])
DISTRO=$(sh detect-distro.sh)
DISTRO_NAME=$(echo $DISTRO | awk -F '-' '{print $1}')
-if [[[ "$DISTRO_NAME" != "rhel" && "$DISTRO_NAME" != "fc" ]]]; then
+if [[[ "$DISTRO_NAME" != "rhel" && "$DISTRO_NAME" != "fc" && "$DISTRO_NAME" != "ubuntu" ]]]; then
AC_MSG_ERROR([$DISTRO_NAME is not a supported distro.])
fi
DISTRO_RELEASE=$(echo $DISTRO | awk -F 'rhel-' '{print $2}' | awk -F '.' '{print $1}')
--- /dev/null
+lipe-lpcc (1.19-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Minh Diep <mdiep@whamcloud.com> Tue, 28 Sep 2021 10:21:04 +0000
--- /dev/null
+Source: lipe-lpcc
+Section: admin
+Priority: optional
+Maintainer: Minh Diep <mdiep@whamcloud.com>
+Uploaders: Minh Diep <mdiep@whamcloud.com>
+Standards-Version: 3.8.3
+Build-Depends: module-assistant, libreadline-dev, debhelper (>=9.0.0), dpatch, automake (>=1.7) | automake1.7 | automake1.8 | automake1.9, pkg-config, libtool
+Homepage: https://wiki.whamcloud.com/
+Vcs-Git: git://git.whamcloud.com/fs/lustre-release.git
+
+Package: lipe-lpcc
+Section: utils
+Architecture: all
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}, e2fsprogs (>= 1.42.13.wc6)
+Description: Tools for LPCC (Lustre Persisted Client Cache)
--- /dev/null
+Source: lipe-lpcc
+Section: admin
+Priority: optional
+Maintainer: Minh Diep <mdiep@whamcloud.com>
+Uploaders: Minh Diep <mdiep@whamcloud.com>
+Standards-Version: 3.8.3
+Build-Depends: module-assistant, libreadline-dev, debhelper (>=9.0.0), dpatch, automake (>=1.7) | automake1.7 | automake1.8 | automake1.9, pkg-config, libtool
+Homepage: https://wiki.whamcloud.com/
+Vcs-Git: git://git.whamcloud.com/fs/lustre-release.git
+
+Package: lipe-lpcc
+Section: utils
+Architecture: all
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}, e2fsprogs (>= 1.42.13.wc6)
+Description: Tools for LPCC (Lustre Persisted Client Cache)
--- /dev/null
+lpcc /usr/bin
+src/lpcc_purge /usr/bin
+lpcc.conf /etc
+systemd/lpcc.service /usr/lib/systemd/system
--- /dev/null
+debian/tmp/usr/share/man/*/*
--- /dev/null
+#!/usr/bin/make -f
+#
+# Created 2021 by Minh Diep based on lustre debian
+#
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+DEB_BUILD_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+DEB_BUILD_GNU_CPU = $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
+
+
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=9
+
+ARCH=$(shell dpkg --print-architecture)
+TOP_DIR:=$(shell pwd)
+
+# Packages provided for both client and server builds
+LPCC_PKG=lipe-lpcc
+
+BUILDDIR=.
+SRCDIR=.
+
+AVAIL_CPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
+ifneq ($(AVAIL_CPUS),1)
+ PMAKEARGS := -j $(AVAIL_CPUS)
+endif
+
+configure: configure-stamp
+configure-stamp: debian/control.main
+ dh_testdir
+ # touch files to same date, to avoid auto*
+ # Build only client
+ export EXTRAFLAGS="--disable-server"; \
+ echo "Final value of EXTRAFLAGS: $${EXTRAFLAGS}"; \
+ ( cd $(BUILDDIR) && \
+ $(SRCDIR)/configure $${EXTRAFLAGS} \
+ $(EXTRA_OPTIONS) \
+ ); \
+ touch $@
+
+build: build-stamp
+build-stamp: configure-stamp
+ dh_testdir
+ $(MAKE) -C $(BUILDDIR) $(PMAKEARGS)
+ $(MAKE) -C $(BUILDDIR) DESTDIR=$(TOP_DIR)/debian/tmp install
+ cp $(BUILDDIR)/lpcc $(TOP_DIR)/debian/tmp/usr/bin
+ mkdir -p $(TOP_DIR)/debian/tmp/etc
+ cp $(BUILDDIR)/lpcc.conf $(TOP_DIR)/debian/tmp/etc
+ mkdir -p $(TOP_DIR)/debian/tmp/usr/lib/systemd/system
+ cp $(BUILDDIR)/systemd/lpcc.service $(TOP_DIR)/debian/tmp/usr/lib/systemd/system
+ mkdir -p $(TOP_DIR)/debian/tmp/usr/share/man/man5
+ mkdir -p $(TOP_DIR)/debian/tmp/usr/share/man/man8
+ cp $(BUILDDIR)/man/*.5 $(TOP_DIR)/debian/tmp/usr/share/man/man5
+ cp $(BUILDDIR)/man/*.8 $(TOP_DIR)/debian/tmp/usr/share/man/man8
+ touch $@
+
+binary-arch: binary-$(LPCC_PKG)
+
+binary: binary-arch
+
+binary-$(LPCC_PKG): build-stamp
+ dh_testdir
+ dh_testroot
+ dh_installdirs -p $(LPCC_PKG)
+ dh_install -p $(LPCC_PKG)
+ dh_installman -p $(LPCC_PKG)
+ dh_makeshlibs -p $(LPCC_PKG)
+ dh_compress -p $(LPCC_PKG)
+ dh_strip -p $(LPCC_PKG)
+ dh_installdeb -p $(LPCC_PKG)
+ dh_fixperms -p $(LPCC_PKG)
+ dh_gencontrol -p $(LPCC_PKG)
+ dh_md5sums -p $(LPCC_PKG)
+ dh_builddeb -p $(LPCC_PKG)
+
+clean:
+ dh_testdir
+ dh_testroot
+ -$(MAKE) distclean
+ rm -rf debian/substvars debian/*.bak debian/*~ *~ *-stamp
+ dh_clean
+ # make sure we have at least a basic control in place (see build-stamp)
+ rm -f debian/control
+ cp debian/control.main debian/control
+
+.PHONY: binary-arch clean source diff binary binary-arch install configure
"Fedora")
name="fc"
;;
+ "Ubuntu")
+ name="ubuntu"
+ ;;
*)
fatal 1 "I don't know what distro name $name and version $version is.\nEither update autodetect_distro() or use the --distro argument."
;;