Skip to content

Commit

Permalink
sys-fs/btrfsmaintenance: new ebuild, #595762
Browse files Browse the repository at this point in the history
Maintenance scripts for btrfs file systems

Closes: gentoo#5003
Package-Manager: Portage-2.3.6, Repoman-2.3.2
  • Loading branch information
Martin Dummer authored and mgorny committed Jul 19, 2017
1 parent 804b37b commit ff72ffa
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-fs/btrfsmaintenance/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST btrfsmaintenance-0.3.1.tar.gz 19698 SHA256 e2f6a6cd433a38407c580630e3f4a0c4747390f0e129d5c9d0f91ec461cfb855 SHA512 89be6da3d6bb3f85f645ac899f173d19cb787e938dd2fc91be16b3202a6784ca33dc4a4d9f9ee78ac6a96468dbaa4f4dc7a2f2e6998d550ea44d7af24198dbfb WHIRLPOOL ee3c73da6a4b88e6b3cd63660fcb1164599e3d09d378f385b6f1ec3613b287d90d2c8be9b4d66472ea56e1755f6a1091bcaec75cb844d376ec98fc54de882f51
45 changes: 45 additions & 0 deletions sys-fs/btrfsmaintenance/btrfsmaintenance-0.3.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

DESCRIPTION="Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag"
HOMEPAGE="https://github.com/kdave/btrfsmaintenance"
SRC_URI="https://github.com/kdave/btrfsmaintenance/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}
sys-fs/btrfs-progs
virtual/cron"

src_install() {
dodoc README.md CONTRIBUTING.md btrfsmaintenance.changes
insinto /etc/default
newins sysconfig.btrfsmaintenance btrfsmaintenance
insinto /usr/share/btrfsmaintenance
doins btrfsmaintenance-functions
exeinto /usr/share/btrfsmaintenance
doexe btrfs*.sh
insinto /usr/lib/systemd/system
doins btrfsmaintenance-refresh.service
}

pkg_postinst() {
elog "Installing default btrfsmaintenance scripts"
"${EROOT%/}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh || die
elog "Now edit cron periods and mount points in /etc/default/btrfsmaintenance"
elog "then run /usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh to"
elog "update cron symlinks"
}

pkg_prerm() {
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
elog "Removing symlinks from btrfsmaintenance cron tasks"
"${EROOT%/}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh uninstall || die
fi
}
15 changes: 15 additions & 0 deletions sys-fs/btrfsmaintenance/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
<name>Martin Dummer</name>
</maintainer>
<maintainer type="project">
<email>[email protected]</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<remote-id type="github">kdave/btrfsmaintenance</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit ff72ffa

Please sign in to comment.