summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Lisowski2023-09-11 23:38:01 +0200
committerMichał Lisowski2023-09-11 23:38:01 +0200
commit0bec8ea0ccd4e219f9d61e42a922177eaa2094ac (patch)
treec8454f69f1dbb50bfc84674e0185ba48bfdc5c34
parent0d51dee27073aada4b72b9979c9e843f1a5af6c2 (diff)
downloadaur-whatmask.tar.gz
Rewrite based on the ruby version
The original http://www.laffeycomputer.com/whatmask.html seems to be umaintained and download of the source isn't longer possible.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD47
-rw-r--r--gem_files.patch22
3 files changed, 62 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 73e2f4543b7f..ccbeb901134d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,15 @@
pkgbase = whatmask
- pkgdesc = Small C program that will help you with network settings
- pkgver = 1.2
+ pkgdesc = Small program that will help you with network settings
+ pkgver = 1.0.9
pkgrel = 1
- url = http://www.laffeycomputer.com/whatmask.html
+ epoch = 1
+ url = https://github.com/geezyx/whatmask
arch = i686
arch = x86_64
- license = GPL
- source = http://downloads.laffeycomputer.com/current_builds/whatmask/whatmask-1.2.tar.gz
- md5sums = 26aeff74dbba70262ccd426e681dcf4a
+ license = GPL3
+ source = whatmask-1.0.9.tar.gz::https://github.com/geezyx/whatmask/archive/v1.0.9.tar.gz
+ source = gem_files.patch
+ md5sums = 06a1b669cc7ab211397d68bb944db7a0
+ md5sums = 606617d2668045dd6898f181c9a18068
pkgname = whatmask
-
diff --git a/PKGBUILD b/PKGBUILD
index 37d7d5b11f2a..814ac099ac08 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,45 @@
-# Maintainer: Michał Lisowski <lisu87@gmail.com>
+# Maintainer: Michał Lisowski <lisu@riseup.net>
pkgname=whatmask
-pkgver=1.2
+pkgver=1.0.9
pkgrel=1
-pkgdesc="Small C program that will help you with network settings"
+epoch=1
+pkgdesc="Small program that will help you with network settings"
arch=('i686' 'x86_64')
-url="http://www.laffeycomputer.com/whatmask.html"
-license=('GPL')
+url="https://github.com/geezyx/whatmask"
+license=('GPL3')
depends=()
makedepends=()
-source=("http://downloads.laffeycomputer.com/current_builds/whatmask/$pkgname-$pkgver.tar.gz")
-md5sums=('26aeff74dbba70262ccd426e681dcf4a')
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/geezyx/whatmask/archive/v$pkgver.tar.gz"
+ 'gem_files.patch'
+)
+md5sums=('06a1b669cc7ab211397d68bb944db7a0'
+ '606617d2668045dd6898f181c9a18068')
prepare() {
- cd "$pkgname-$pkgver"
+ cd "${pkgname}-${pkgver}"
+
+ # update gemspec/Gemfile to allow newer version of the dependencies
+ sed --in-place --regexp-extended 's|~>|>=|g' "${pkgname}.gemspec"
+
+ patch --forward --strip=1 --input="${srcdir}/gem_files.patch"
}
build() {
- cd "$pkgname-$pkgver"
- aclocal
- autoconf
- automake --add-missing
- ./configure --prefix=/usr
- make
+ cd "${pkgname}-${pkgver}"
+
+ gem build "${pkgname}.gemspec"
}
package() {
- cd "$pkgname-$pkgver"
- make DESTDIR="$pkgdir/" install
+ cd "${pkgname}-${pkgver}"
+
+ local _gemdir="$(gem env gemdir)"
+
+ gem install \
+ --ignore-dependencies \
+ --no-user-install \
+ --install-dir "${pkgdir}/${_gemdir}" \
+ --bindir "${pkgdir}/usr/bin" \
+ "${pkgname}-${pkgver}.gem"
}
diff --git a/gem_files.patch b/gem_files.patch
new file mode 100644
index 000000000000..3b91187742ae
--- /dev/null
+++ b/gem_files.patch
@@ -0,0 +1,22 @@
+--- whatmask-1.0.9/whatmask.gemspec.bak 2023-09-11 23:32:44.953472527 +0200
++++ whatmask-1.0.9/whatmask.gemspec 2023-09-11 23:32:49.106932827 +0200
+@@ -14,7 +14,7 @@
+ gem.email = "geezyx@gmail.com"
+ gem.homepage = "https://github.com/geezyx/whatmask"
+
+- gem.files = `git ls-files`.split($/)
++ gem.files = `find . -type f`.split($/)
+
+ `git submodule --quiet foreach --recursive pwd`.split($/).each do |submodule|
+ submodule.sub!("#{Dir.pwd}/",'')
+@@ -25,8 +25,8 @@
+ end
+ end
+ end
+- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
++ gem.executables = gem.files.grep(%r{^\./bin/}).map{ |f| File.basename(f) }
++ gem.test_files = gem.files.grep(%r{^\./(test|spec|features)/})
+ gem.require_paths = ['lib']
+
+ gem.add_development_dependency 'bundler', '>= 2.3'