updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / ntfs-3g_ntfsprogs-git / PKGBUILD
blob86a4ec76f9ec780d656b5546558ee388f18cca49
1 # Maintainer : Keshav P R <(the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
2 # Contributor: Ronald van Haren <ronald.archlinux.org>
3 # Contributor: Thomas Bächler <thomas.archlinux.org>
5 _pkgname="ntfs-3g_ntfsprogs"
6 pkgname="${_pkgname}-git"
8 pkgver=20111215
9 pkgrel=1
10 pkgdesc="Read and write NTFS driver and utilities - GIT version"
11 url="http://www.tuxera.com"
12 arch=('i686' 'x86_64')
13 license=('GPL2')
14 makedepends=('pkgconfig')
15 depends=('glibc' 'fuse' 'util-linux')
16 conflicts=("${_pkgname}" 'ntfs-3g' 'ntfsprogs' 'ntfs-3g-ar')
17 provides=("${_pkgname}" 'ntfs-3g' 'ntfsprogs' 'ntfs-3g-ar')
18 options=(strip !emptydirs zipman !libtool docs)
20 source=('25-ntfs-config-write-policy.fdi')
21 sha256sums=('2fb07cecf5b63881ef2ea8ad298df7a640ec84aebb883979bbc222113756b0d2')
23 _gitroot="git://ntfs-3g.git.sourceforge.net/gitroot/ntfs-3g/ntfs-3g"
24 _gitname="${_pkgname}"
25 _gitbranch="edge"
27 _update_git() {
28         
29         cd "${srcdir}/"
30         
31         msg "Connecting to GIT server...."
32         
33         if [ -d "${srcdir}/${_gitname}/" ]
34         then
35                 cd "${srcdir}/${_gitname}/"
36                 git reset --hard
37                 git fetch
38                 git checkout "${_gitbranch}"
39                 git merge "remotes/origin/${_gitbranch}"
40                 msg "The local GIT repo has been updated."
41         else
42                 git clone "${_gitroot}" "${_gitname}"
43                 cd "${srcdir}/${_gitname}/"
44                 git checkout "${_gitbranch}"
45                 msg "GIT checkout done or server timeout"
46         fi
47         
48         echo
49         
52 build() {
53         
54         _update_git
55         
56         rm -rf "${srcdir}/${_gitname}_build/" || true
57         cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}_build"
58         
59         cd "${srcdir}/${_gitname}_build/"
60         
61         ./autogen.sh
62         echo
63         
64         ac_cv_path_LDCONFIG="/bin/true" ./configure --prefix="/usr" \
65                                                                                                 --bindir="/usr/bin" \
66                                                                                                 --sbindir="/usr/sbin" \
67                                                                                                 --mandir="/usr/share/man" \
68                                                                                                 --enable-posix-acls \
69                                                                                                 --enable-xattr-mappings \
70                                                                                                 --enable-extras \
71                                                                                                 --with-fuse="external" \
72                                                                                                 --disable-static
73         echo
74         
75         make
76         echo
77         
80 package() {
81         
82         cd "${srcdir}/${_gitname}_build/"
83         
84         make DESTDIR="${pkgdir}/" install
85         echo
86         
87         # install -d "${pkgdir}/usr/sbin"
88         
89         # ln -s "/bin/ntfs-3g" "${pkgdir}/usr/sbin/mount.ntfs"
90         # ln -s "/usr/bin/ntfsck" "${pkgdir}/usr/sbin/fsck.ntfs"
91         # ln -s "/usr/bin/ntfsck" "${pkgdir}/usr/sbin/fsck.ntfs-3g"
92         
93         install -d "${pkgdir}/sbin"
94         
95         ln -s "/sbin/mount.ntfs-3g" "${pkgdir}/sbin/mount.ntfs"
96         ln -s "/usr/bin/ntfsck" "${pkgdir}/sbin/fsck.ntfs"
97         ln -s "/usr/bin/ntfsck" "${pkgdir}/sbin/fsck.ntfs-3g"
98         
99         install -d "${pkgdir}/usr/share/hal/fdi/policy/10osvendor"
100         install -D -m0644 "${srcdir}/25-ntfs-config-write-policy.fdi" "${pkgdir}/usr/share/hal/fdi/policy/10osvendor/25-ntfs-config-write-policy.fdi"
101