local_pac 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,4 @@
1
1
  ---
2
- :storage_path: ~/.local/share/pacfiles/cache/cache.pstore
3
- :import_paths:
4
- - ~/.local/share/pacfiles/new
5
- - ~/.pacfiles/new
6
- - /var/pacfiles/new
2
+ :log_sink: ~/.local/share/local_pac/log
3
+ :local_storage: ~/.local/share/local_pac/data
4
+ :pid_file: ~/.local/share/local_pac/run/pid
@@ -28,7 +28,7 @@ module LocalPac
28
28
  yaml = Psych.load_file(file)
29
29
 
30
30
  if yaml.respond_to? :[]
31
- @config = yaml.freeze
31
+ @config = yaml.symbolize_keys.freeze
32
32
  else
33
33
  @config = {}.freeze
34
34
  end
@@ -59,7 +59,6 @@ module LocalPac
59
59
 
60
60
  def candiate_files
61
61
  [
62
- File.expand_path(File.join(Dir.getwd, 'config.yaml')),
63
62
  File.expand_path(File.join(ENV['HOME'], '.config', 'local_pac', 'config.yaml')),
64
63
  File.expand_path(File.join(ENV['HOME'], '.local_pac', 'config.yaml')),
65
64
  File.expand_path(File.join('/etc', 'local_pac', 'config.yaml')),
@@ -1,4 +1,4 @@
1
1
  #main LocalPac
2
2
  module LocalPac
3
- VERSION = '0.1.7'
3
+ VERSION = '0.1.8'
4
4
  end
@@ -1,16 +1,17 @@
1
1
  # Maintainer: Max Meyer <dev@fedux.org>
2
2
  pkgname=local_pac
3
- pkgver=0.1.6
4
- pkgrel=2
3
+ pkgver=0.1.7
4
+ pkgrel=1
5
5
  pkgdesc="local pacfile serving server"
6
6
  arch=(i686 x86_64)
7
7
  url="https://github.com/dg-vrnetze/${pkgname}"
8
8
  license=('MIT')
9
9
  depends=(ruby)
10
+ install=${pkgname}.install
10
11
  makedepends=(rubygems filegen)
11
12
  source=(http://gems.rubyforge.org/gems/$pkgname-$pkgver.gem)
12
13
  noextract=($pkgname-$pkgver.gem)
13
- sha256sums=('1141ef7b1eafd1b67fe210ae3dde9d72b397b48842ae6b3f377a093af56a9094')
14
+ sha256sums=('8a37d7b0b48401daaba6d6151fd603b61b0e33848a3faee69502598b11042236')
14
15
 
15
16
  package() {
16
17
  cd "$srcdir"
@@ -19,10 +20,19 @@ package() {
19
20
  _share_dir="${_library_dir}/gems/${pkgname}-${pkgver}/share"
20
21
  _systemd_dir=/usr/lib/systemd/system
21
22
  _bin_dir=/usr/bin
23
+ _data_dir=/var/${pkgname}/data
24
+ _log_dir=/var/log/${pkgname}
25
+ _config_dir=/etc/${pkgname}
26
+ _examples_dir=/usr/share/${pkgname}/examples
22
27
 
23
28
  install -d ${pkgdir}/$_library_dir
24
29
  install -d ${pkgdir}/$_bin_dir
25
30
  install -d ${pkgdir}/$_systemd_dir
31
+ install -d ${pkgdir}/$_data_dir
32
+ install -d ${pkgdir}/$_log_dir
33
+ install -d ${pkgdir}/$_config_dir
34
+
35
+ install -d -m 644 ${pkgdir}${_share_dir}/archlinux/config.yaml ${pkgdir}${_examples_dir}/config.yaml.example
26
36
 
27
37
  GEM_HOME="${pkgdir}/${_library_dir}" GEM_ROOT="${pkgdir}/${_library_dir}" GEM_PATH="${pkgdir}/${_library_dir}" gem install --env-shebang --wrappers --no-ri --no-rdoc --install-dir ${pkgdir}/${_library_dir} $pkgname
28
38
 
@@ -0,0 +1,3 @@
1
+ ---
2
+ :log_sink: /var/log/local_pac
3
+ :local_storage: /var/local_pac/data
@@ -0,0 +1,12 @@
1
+ post_install() {
2
+ echo "Please place a config file at one of the following places:"
3
+ echo " * $HOME/.config/local_pac/config.yaml"
4
+ echo " * $HOME/.local_pac/config.yaml"
5
+ echo " * /etc/local_pac/config.yaml"
6
+
7
+ echo "An example config file can be found at \"/usr/share/local_pac/examples/config.yaml.example\""
8
+ }
9
+
10
+ post_upgrade() {
11
+ post_install
12
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: local_pac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -200,6 +200,8 @@ files:
200
200
  - local_pac.gemspec
201
201
  - share/archlinux/Makefile
202
202
  - share/archlinux/PKGBUILD
203
+ - share/archlinux/config.yaml
204
+ - share/archlinux/local_pac.install
203
205
  - share/archlinux/startup.erb
204
206
  - share/examples/config.yaml
205
207
  - share/systemd/local_pac.service