aboutsummaryrefslogtreecommitdiff
path: root/Keywords/fontsdir.ucl
blob: 8c0701223e5332407834a00872fce47c3275bd23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# MAINTAINER: x11@FreeBSD.org

actions: [dir]
post-install-lua: <<EOD
  fontdir = pkg.prefixed_path("%@")
  pkg.exec({"mkfontscale", fontdir})
  pkg.exec({"mkfontdir", fontdir})
EOD
post-deinstall-lua: <<EOD
  fontdir = pkg.prefixed_path("%@")
  pkg.exec({"mkfontscale", fontdir})
  pkg.exec({"mkfontdir", fontdir})
  for _, v in pairs {"/fonts.scale", "/fonts.dir" } do
    local st = pkg.stat(fontdir .. v)
    if st and st.type == "reg" and st.size == 2 then
      os.remove(fontdir .. v)
    end
  end
EOD