1 # Maintainer: Balló György <ballogyor+arch at gmail dot com>
2 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
3 # Contributor: Unknown47 <unknown47r@gmail.com>
4 # Contributor: Angel Velasquez <angvp@archlinux.org>
5 # Contributor: Juergen Hoetzel <juergen@archlinux.org>
8 pkgname=(libfm libfm-extra libfm-gtk2 libfm-gtk3)
11 pkgdesc='Library for file management'
12 url='https://lxde.org/'
15 depends=('gtk2' 'gtk3' 'libexif' 'menu-cache')
16 makedepends=('intltool' 'gtk-doc')
17 source=(https://downloads.sourceforge.net/pcmanfm/libfm-$pkgver.tar.xz)
18 sha256sums=('a5042630304cf8e5d8cff9d565c6bd546f228b48c960153ed366a34e87cad1e5')
22 # Update xarchiver option
23 # https://github.com/lxde/libfm/issues/35
24 sed -i 's/create=xarchiver --add-to %F/create=xarchiver --compress %F/' data/archivers.list
31 [ -d gtk2 ] || cp -r $pkgbase-$pkgver gtk2
33 ./configure --prefix=/usr \
38 #https://bugzilla.gnome.org/show_bug.cgi?id=656231
39 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
45 [ -d gtk3 ] || cp -r $pkgbase-$pkgver gtk3
47 ./configure --prefix=/usr \
52 #https://bugzilla.gnome.org/show_bug.cgi?id=656231
53 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
59 depends=('libexif' "libfm-extra=$pkgver" 'menu-cache')
62 make DESTDIR="$pkgdir" install
64 # Temporary fix to FS#32361
65 rm -rf "$pkgdir"/usr/include/libfm
66 mv "$pkgdir"/usr/include/libfm-1.0/ "$pkgdir"/usr/include/libfm
69 [[ -d "$srcdir/libfm-extra" ]] && rm -r "$srcdir/libfm-extra/"
70 mkdir "$srcdir"/libfm-extra
71 mv "$pkgdir"/usr/include/libfm/fm-{extra,version,xml-file}.h \
72 "$pkgdir"/usr/lib/libfm-extra.* \
73 "$pkgdir"/usr/lib/pkgconfig/libfm-extra.pc \
74 "$srcdir/libfm-extra/"
77 [[ -d "$srcdir/libfm-gtk2" ]] && rm -r "$srcdir/libfm-gtk2/"
78 mkdir "$srcdir"/libfm-gtk2
79 mv "$pkgdir/usr/bin" \
80 "$pkgdir"/usr/lib/libfm-gtk.* \
81 "$pkgdir"/usr/lib/libfm/modules/gtk-* \
82 "$pkgdir/usr/lib/pkgconfig/libfm-gtk.pc" \
83 "$pkgdir/usr/share/applications" \
84 "$pkgdir/usr/share/man" \
88 package_libfm-extra() {
89 pkgdesc="Extra library for file management"
92 cd "$srcdir"/libfm-extra
93 mkdir -p "$pkgdir"/usr/{include/libfm,lib/pkgconfig}
94 mv *.h "$pkgdir/usr/include/libfm"
95 mv libfm-extra.so* "$pkgdir/usr/lib"
96 mv libfm-extra.pc "$pkgdir/usr/lib/pkgconfig"
99 package_libfm-gtk2() {
100 pkgdesc='GTK+ 2 library for file management'
101 depends=('gtk2' 'menu-cache' "libfm=$pkgver")
102 replaces=('lxshortcut')
103 provides=('lxshortcut')
104 conflicts=('lxshortcut')
106 cd "$srcdir"/libfm-gtk2
107 mkdir -p "$pkgdir"/usr/{lib/{libfm/modules,pkgconfig},share}
109 mv libfm-gtk.so* "$pkgdir"/usr/lib
110 mv gtk-* "$pkgdir"/usr/lib/libfm/modules
111 mv libfm-gtk.pc "$pkgdir/usr/lib/pkgconfig"
112 mv applications "$pkgdir/usr/share"
113 mv man "$pkgdir/usr/share"
116 package_libfm-gtk3() {
117 pkgdesc='GTK+ 3 library for file management'
118 depends=('gtk3' 'menu-cache' "libfm=$pkgver")
119 conflicts=('libfm-gtk2' 'lxshortcut')
122 make DESTDIR="$srcdir"/libfm-gtk3 install
124 cd "$srcdir"/libfm-gtk3
125 mkdir -p "$pkgdir"/usr/{lib/{libfm/modules,pkgconfig},share}
126 mv usr/bin "$pkgdir/usr"
127 mv usr/lib/libfm-gtk3.so* "$pkgdir"/usr/lib
128 mv usr/lib/libfm/modules/gtk-* "$pkgdir"/usr/lib/libfm/modules
129 mv usr/lib/pkgconfig/libfm-gtk3.pc "$pkgdir/usr/lib/pkgconfig"
130 mv usr/share/applications "$pkgdir/usr/share"
131 mv usr/share/man "$pkgdir/usr/share"