1d583833aSAndrew Geissler 2d583833aSAndrew GeisslerSUMMARY = "Services for periodic btrfs maintenance tasks" 3d583833aSAndrew GeisslerDESCRIPTION = "A set of scripts supplementing the btrfs filesystem and aims \ 4d583833aSAndrew Geissler to automate a few maintenance tasks. This means the scrub, balance, trim \ 5d583833aSAndrew Geissler or defragmentation." 6d583833aSAndrew GeisslerHOMEPAGE = "https://github.com/kdave/btrfsmaintenance" 7d583833aSAndrew GeisslerLICENSE = "GPL-2.0-only" 8d583833aSAndrew GeisslerLIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a" 9d583833aSAndrew Geissler 10d583833aSAndrew GeisslerSECTION = "base" 11d583833aSAndrew Geissler 12d583833aSAndrew GeisslerDEPENDS = "btrfs-tools" 13d583833aSAndrew Geissler 14d583833aSAndrew GeisslerSRC_URI = "git://github.com/kdave/${BPN};branch=master;protocol=https \ 15d583833aSAndrew Geissler file://0001-change-sysconfig-path-to-etc-default.patch \ 16d583833aSAndrew Geissler file://0002-add-WantedBy-directive-to-btrfsmaintenance-refresh.s.patch \ 17d583833aSAndrew Geissler" 18d583833aSAndrew GeisslerSRCREV = "be42cb6267055d125994abd6927cf3a26deab74c" 19d583833aSAndrew Geissler 20d583833aSAndrew GeisslerUPSTREAM_CHECK_URI = "https://github.com/kdave/${BPN}/tags" 21d583833aSAndrew GeisslerUPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P<pver>\d+(?:\.\d+)*)" 22d583833aSAndrew Geissler 23d583833aSAndrew GeisslerRDEPENDS:${PN} = "bash" 24d583833aSAndrew Geissler 25d583833aSAndrew GeisslerS="${WORKDIR}/git" 26d583833aSAndrew Geissler 27d583833aSAndrew Geisslerinherit allarch 28d583833aSAndrew Geissler 29d583833aSAndrew Geisslerdo_configure[noexec] = "1" 30d583833aSAndrew Geisslerdo_compile[noexec] = "1" 31d583833aSAndrew Geissler 32d583833aSAndrew Geisslerdo_install() { 33d583833aSAndrew Geissler install -Dm0644 ${S}/btrfsmaintenance-refresh.path \ 34d583833aSAndrew Geissler ${D}${systemd_system_unitdir}/btrfsmaintenance-refresh.path 35d583833aSAndrew Geissler install -Dm0644 ${S}/*.timer \ 36d583833aSAndrew Geissler ${D}${systemd_system_unitdir} 37d583833aSAndrew Geissler install -Dm0644 ${S}/*.service \ 38d583833aSAndrew Geissler ${D}${systemd_system_unitdir} 39d583833aSAndrew Geissler 40d583833aSAndrew Geissler install -Dm0644 ${S}/btrfsmaintenance-functions \ 41*3eeda90dSAndrew Geissler ${D}${datadir}/${BPN}/btrfsmaintenance-functions 42d583833aSAndrew Geissler install -Dm0755 ${S}/*.sh \ 43*3eeda90dSAndrew Geissler ${D}${datadir}/${BPN} 44d583833aSAndrew Geissler 45d583833aSAndrew Geissler install -Dm0644 ${S}/sysconfig.btrfsmaintenance \ 46d583833aSAndrew Geissler ${D}${sysconfdir}/default/btrfsmaintenance 47d583833aSAndrew Geissler} 48d583833aSAndrew Geissler 49d583833aSAndrew Geisslerinherit systemd 50d583833aSAndrew GeisslerSYSTEMD_PACKAGES = "${PN}" 51d583833aSAndrew GeisslerSYSTEMD_SERVICE:${PN} = " \ 52d583833aSAndrew Geissler btrfs-scrub.timer \ 53d583833aSAndrew Geissler btrfs-scrub.service \ 54d583833aSAndrew Geissler btrfs-trim.timer \ 55d583833aSAndrew Geissler btrfs-trim.service \ 56d583833aSAndrew Geissler btrfs-balance.timer \ 57d583833aSAndrew Geissler btrfs-balance.service \ 58d583833aSAndrew Geissler btrfs-defrag.timer \ 59d583833aSAndrew Geissler btrfs-defrag.service \ 60d583833aSAndrew Geissler btrfsmaintenance-refresh.service \ 61d583833aSAndrew Geissler btrfsmaintenance-refresh.path \ 62d583833aSAndrew Geissler" 63