diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | gem_files.patch | 22 |
3 files changed, 62 insertions, 23 deletions
@@ -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 - @@ -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' |