Date: Wednesday, February 27, 2019 @ 21:35:26 Author: heftig Revision: 436838
archrelease: copy trunk to community-staging-x86_64 Added: deepin-anything-arch/repos/community-staging-x86_64/ deepin-anything-arch/repos/community-staging-x86_64/PKGBUILD (from rev 436828, deepin-anything-arch/trunk/PKGBUILD) deepin-anything-arch/repos/community-staging-x86_64/linux-4.20.patch (from rev 436828, deepin-anything-arch/trunk/linux-4.20.patch) ------------------+ PKGBUILD | 35 +++++++++++++++++++++++++++++++++++ linux-4.20.patch | 16 ++++++++++++++++ 2 files changed, 51 insertions(+) Copied: deepin-anything-arch/repos/community-staging-x86_64/PKGBUILD (from rev 436828, deepin-anything-arch/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2019-02-27 21:35:26 UTC (rev 436838) @@ -0,0 +1,35 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgname=deepin-anything-arch +pkgver=0.0.4 +_extramodules=extramodules-ARCH +pkgrel=6 +pkgdesc="Deepin Anything file search tool, kernel module for Arch kernel" +arch=('x86_64') +url="https://github.com/linuxdeepin/deepin-anything" +license=('GPL3') +depends=('linux>=4.20' 'linux<4.21') +makedepends=('linux-headers>=4.20') +provides=('DEEPIN-ANYTHING-MODULE') +replaces=('deepin-anything-module') +source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-anything/archive/$pkgver.tar.gz" + linux-4.20.patch) +sha512sums=('fcb7683ce3bef818ac06dd62f14b5624669f9c09b53c5f08e319b724f5408bc221154428a6436d9e2a68aa6444e966c494c8a7611dfed0c93b6b9e71a3da0f55' + 'dc3c85e9535cc589fdf56d265c4330519c92b5bcc406153e3162ba6ef5e799b702c394e1961132770f4f3ddd288dbbfe74a9d8056329e4585eb5a2094ffe0155') + +prepare() { + cd deepin-anything-$pkgver + patch -p1 -i ../linux-4.20.patch +} + +build() { + cd deepin-anything-$pkgver + _kernver="$(cat /usr/lib/modules/$_extramodules/version)" + make -C kernelmod kdir=/usr/lib/modules/$_kernver/build +} + +package() { + cd deepin-anything-$pkgver/kernelmod + install -Dm644 vfs_monitor.ko "$pkgdir"/usr/lib/modules/$_extramodules/vfs_monitor.ko + gzip "$pkgdir"/usr/lib/modules/$_extramodules/vfs_monitor.ko +} Copied: deepin-anything-arch/repos/community-staging-x86_64/linux-4.20.patch (from rev 436828, deepin-anything-arch/trunk/linux-4.20.patch) =================================================================== --- community-staging-x86_64/linux-4.20.patch (rev 0) +++ community-staging-x86_64/linux-4.20.patch 2019-02-27 21:35:26 UTC (rev 436838) @@ -0,0 +1,16 @@ +diff --git a/kernelmod/vfs_change.c b/kernelmod/vfs_change.c +index 0d6d360..d09e439 100644 +--- a/kernelmod/vfs_change.c ++++ b/kernelmod/vfs_change.c +@@ -115,7 +115,11 @@ static ssize_t copy_vfs_changes(struct timeval *last, char* buf, size_t size) + + time_t shifted_secs = vc->ts.tv_sec + hour_shift*3600; + struct tm ts; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) + time_to_tm(shifted_secs, 0, &ts); ++#else ++ time64_to_tm(shifted_secs, 0, &ts); ++#endif + char temp[MIN_LINE_SIZE]; + snprintf(temp, sizeof(temp), "%04ld-%02d-%02d %02d:%02d:%02d.%03ld %s ", + 1900+ts.tm_year, 1+ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec, vc->ts.tv_usec/1000,