diff --git a/rules/dosfstools/common.bash b/rules/dosfstools/common.bash new file mode 100644 index 0000000..7fbed6d --- /dev/null +++ b/rules/dosfstools/common.bash @@ -0,0 +1,24 @@ +version=\ +( + '3.0.20' +) + +url=\ +( + "http://daniel-baumann.ch/files/software/dosfstools/dosfstools-$version.tar.gz" +) + +md5=\ +( + '7f1c1afd4ae4622e07b24ec0ddfc4184' +) + +maintainer=\ +( + 'Ricardo Martins ' +) + +configure() +{ + $cmd_make distclean +} diff --git a/rules/dosfstools/default.bash b/rules/dosfstools/default.bash new file mode 100644 index 0000000..d7078ce --- /dev/null +++ b/rules/dosfstools/default.bash @@ -0,0 +1,17 @@ +source $pkg_common + +build() +{ + CC="$cmd_target_cc" \ + $cmd_make \ + PREFIX="$cfg_dir_toolchain_sysroot/usr" +} + +target_install() +{ + $cmd_target_strip --strip-unneeded "../dosfstools-$version/mkfs.fat" -o "$cfg_dir_rootfs/sbin/mkfs.fat" && + $cmd_target_strip --strip-unneeded "../dosfstools-$version/fsck.fat" -o "$cfg_dir_rootfs/sbin/fsck.fat" && + $cmd_target_strip --strip-unneeded "../dosfstools-$version/fatlabel" -o "$cfg_dir_rootfs/sbin/fatlabel" && + ln -fs mkfs.fat "$cfg_dir_rootfs/sbin/mkfs.vfat" && + ln -fs fsck.fat "$cfg_dir_rootfs/sbin/fsck.vfat" +} diff --git a/rules/dosfstools/host.bash b/rules/dosfstools/host.bash index f68086b..f7aac71 100644 --- a/rules/dosfstools/host.bash +++ b/rules/dosfstools/host.bash @@ -1,22 +1,4 @@ -version=\ -( - '3.0.20' -) - -url=\ -( - "http://daniel-baumann.ch/files/software/dosfstools/dosfstools-$version.tar.gz" -) - -md5=\ -( - '7f1c1afd4ae4622e07b24ec0ddfc4184' -) - -maintainer=\ -( - 'Ricardo Martins ' -) +source $pkg_common build() {