diff options
author | Mike Swanson | 2018-10-18 15:44:04 -0700 |
---|---|---|
committer | Mike Swanson | 2018-10-18 15:45:43 -0700 |
commit | bad9891c7472bbfd5b96f8f69f1493063dab46c0 (patch) | |
tree | ae2a0c5cf6430f85af2a015093d8edc3fe90aecd | |
download | aur-bad9891c7472bbfd5b96f8f69f1493063dab46c0.tar.gz |
Initial TorrentZip PKGBUILD
Patch comes from FreeBSD ports, modified to work on Linux
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | permissions-fix.patch | 33 |
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..638b95f0362a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +# Generated by mksrcinfo v8 +# Thu Oct 18 22:45:18 UTC 2018 +pkgbase = torrentzip + pkgdesc = Efficient way to prepare Zip files for BitTorrent + pkgver = 0.2 + pkgrel = 1 + url = https://sourceforge.net/projects/trrntzip/ + arch = i686 + arch = x86_64 + license = GPL2 + source = https://sourceforge.net/projects/trrntzip/files/trrntzip/TorrentZip%20v0.2/trrntzip_v02_src.tar.gz + source = permissions-fix.patch + sha512sums = 802dd1bf55e0a31df75d8195c9d2d5610be8cb7f14d14278eba72b580aff3ad415711999db05a5425303380ebfc82a68896e276319e0ead5635d0a07615ba700 + sha512sums = db876bf7d01345699862dd7b37ddd899d19029542e69c36c718403bbc312422c64a5a723875fdccd5604b4b26331638c1c254f005a8b9dcc627cc519a27171b9 + +pkgname = torrentzip + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..665307854be8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pkg.tar* +*.src.tar* +*.gz +src +pkg diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fc595cbfd9fa --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com> + +pkgname=torrentzip +pkgver=0.2 +pkgrel=1 +pkgdesc="Efficient way to prepare Zip files for BitTorrent" +arch=('i686' 'x86_64') +url="https://sourceforge.net/projects/trrntzip/" +license=('GPL2') +source=("https://sourceforge.net/projects/trrntzip/files/trrntzip/TorrentZip%20v0.2/trrntzip_v02_src.tar.gz" + permissions-fix.patch) +sha512sums=('802dd1bf55e0a31df75d8195c9d2d5610be8cb7f14d14278eba72b580aff3ad415711999db05a5425303380ebfc82a68896e276319e0ead5635d0a07615ba700' + 'db876bf7d01345699862dd7b37ddd899d19029542e69c36c718403bbc312422c64a5a723875fdccd5604b4b26331638c1c254f005a8b9dcc627cc519a27171b9') + +prepare() { + cd trrntzip + + for patch in ../*.patch; do + if [ ! -f "$patch" ]; then + break; + else + patch -p1 -i "$patch" + fi + done + + autoreconf -fi +} + +build() { + cd trrntzip + ./configure --prefix=/usr + make +} + +package() { + cd trrntzip + make DESTDIR="$pkgdir/" install + ln -s trrntzip "$pkgdir"/usr/bin/torrentzip +} diff --git a/permissions-fix.patch b/permissions-fix.patch new file mode 100644 index 000000000000..874e4224ff09 --- /dev/null +++ b/permissions-fix.patch @@ -0,0 +1,33 @@ +diff -ur trrntzip.orig/src/trrntzip.c trrntzip/src/trrntzip.c +--- trrntzip.orig/src/trrntzip.c 2005-05-02 06:38:40.000000000 -0700 ++++ trrntzip/src/trrntzip.c 2018-10-18 15:28:39.563261422 -0700 +@@ -716,7 +716,7 @@ + + if (dirp) + { +- // First set all the files to read-only. This is so we can skip ++ // First set the sticky bit on all files. This is so we can skip + // our new zipfiles if they are returned by readdir() a second time. + while (direntp = readdir (dirp)) + { +@@ -732,7 +732,7 @@ + + if (strstr (szTmpBuf, ".zip\0")) + { +- chmod (direntp->d_name, S_IRUSR); ++ chmod (direntp->d_name, istat.st_mode | S_ISVTX); + } + } + // Zip file is actually a dir +@@ -780,9 +780,9 @@ + sprintf (szTmpBuf, "%s", direntp->d_name); + strlwr (szTmpBuf); + +- if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR)) ++ if (strstr (szTmpBuf, ".zip\0") && (istat.st_mode & S_ISVTX)) + { +- chmod (direntp->d_name, S_IWUSR); ++ chmod (direntp->d_name, istat.st_mode & ~S_ISVTX); + mig.cEncounteredZips++; + + if (!mig.fProcessLog) |