Makefile 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. #
  2. # Copyright (C) 2007-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=util-linux
  9. PKG_VERSION:=2.21.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.21
  13. PKG_MD5SUM:=ad602dcd528f340b1329cfa6200d8f80
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_BUILD_DEPENDS:=libncurses
  16. PKG_FIXUP:=autoreconf
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/util-linux/Default
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. URL:=http://www.kernel.org/pub/linux/utils/util-linux/
  22. endef
  23. CONFIGURE_VARS += \
  24. scanf_cv_alloc_modifier="ms"
  25. CONFIGURE_ARGS += \
  26. --enable-new-mount \
  27. --with-ncurses \
  28. --disable-nls \
  29. --disable-tls
  30. define Build/InstallDev
  31. $(MAKE) -C $(PKG_BUILD_DIR) \
  32. BUILDCC="$(HOSTCC)" \
  33. DESTDIR="$(1)" \
  34. installdirs install-data
  35. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  36. $(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
  37. $(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
  38. $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
  39. $(INSTALL_DIR) $(1)/usr/include/blkid
  40. $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
  41. $(INSTALL_DIR) $(1)/usr/include/libmount
  42. $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
  43. $(INSTALL_DIR) $(1)/usr/include/uuid
  44. $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.{a,so.*} $(1)/usr/lib
  47. $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.{a,so.*} $(1)/usr/lib
  48. $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.{a,so.*} $(1)/usr/lib
  49. endef
  50. define Package/libblkid
  51. $(call Package/util-linux/Default)
  52. TITLE:=block device id library
  53. SECTION:=libs
  54. CATEGORY:=Libraries
  55. endef
  56. define Package/libblkid/description
  57. The libblkid library is used to identify block devices (disks) as to their
  58. content (e.g. filesystem type, partitions) as well as extracting additional
  59. information such as filesystem labels/volume names, partitions, unique
  60. identifiers/serial numbers...
  61. endef
  62. define Package/libmount
  63. $(call Package/util-linux/Default)
  64. TITLE:=mount library
  65. SECTION:=libs
  66. CATEGORY:=Libraries
  67. endef
  68. define Package/libblkid/description
  69. The libmount library is used to parse /etc/fstab, /etc/mtab and
  70. /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
  71. endef
  72. define Package/libuuid
  73. $(call Package/util-linux/Default)
  74. TITLE:=DCE compatible Universally Unique Identifier library
  75. SECTION:=libs
  76. CATEGORY:=Libraries
  77. endef
  78. define Package/libuuid/description
  79. The UUID library is used to generate unique identifiers for objects
  80. that may be accessible beyond the local system. This library
  81. generates UUIDs compatible with those created by the Open Software
  82. Foundation (OSF) Distributed Computing Environment (DCE) utility.
  83. endef
  84. define Package/agetty
  85. $(call Package/util-linux/Default)
  86. TITLE:=alternative Linux getty
  87. SUBMENU=Terminal
  88. endef
  89. define Package/agetty/description
  90. agetty opens a tty port, prompts for a login name and invokes the
  91. /bin/login command
  92. endef
  93. define Package/blkid
  94. $(call Package/util-linux/Default)
  95. TITLE:=locate/print block device attributes
  96. DEPENDS:= +libblkid +libuuid
  97. SUBMENU=disc
  98. endef
  99. define Package/blkid/description
  100. The blkid program is the command-line interface to working with the libblkid
  101. library.
  102. endef
  103. define Package/cal
  104. $(call Package/util-linux/Default)
  105. TITLE:=display a calendar
  106. DEPENDS:= +libncurses
  107. endef
  108. define Package/cal/description
  109. cal displays a simple calendar
  110. endef
  111. define Package/cfdisk
  112. $(call Package/util-linux/Default)
  113. TITLE:=display or manipulate disk partition table
  114. DEPENDS:= +libblkid +libncurses +libuuid
  115. SUBMENU:=disc
  116. endef
  117. define Package/cfdisk/description
  118. cfdisk is a curses-based program for partitioning any hard disk drive
  119. endef
  120. define Package/dmesg
  121. $(call Package/util-linux/Default)
  122. TITLE:=print or control the kernel ring buffer
  123. endef
  124. define Package/dmesg/description
  125. dmesg is used to examine or control the kernel ring buffer
  126. endef
  127. define Package/fdisk
  128. $(call Package/util-linux/Default)
  129. TITLE:=manipulate disk partition table
  130. DEPENDS:= +libblkid +libuuid
  131. SUBMENU=disc
  132. endef
  133. define Package/fdisk/description
  134. a menu-driven program for creation and manipulation of partition tables
  135. endef
  136. define Package/findfs
  137. $(call Package/util-linux/Default)
  138. TITLE:=find a filesystem by label or UUID
  139. DEPENDS:= +libblkid +libuuid
  140. SUBMENU=disc
  141. endef
  142. define Package/findfs/description
  143. findfs will search the disks in the system looking for a filesystem which has
  144. a label matching label or a UUID equal to uuid
  145. endef
  146. define Package/flock
  147. $(call Package/util-linux/Default)
  148. TITLE:=manage locks from shell scripts
  149. endef
  150. define Package/flock/description
  151. manages flock locks from within shell scripts or the command line
  152. endef
  153. define Package/getopt
  154. $(call Package/util-linux/Default)
  155. TITLE:=parse command options (enhanced)
  156. endef
  157. define Package/getopt/description
  158. getopt is used to break up (parse) options in command lines for easy parsing
  159. by shell procedures, and to check for legal options
  160. endef
  161. define Package/hwclock
  162. $(call Package/util-linux/Default)
  163. TITLE:=query or set the hardware clock
  164. endef
  165. define Package/hwclock/description
  166. hwclock is a tool for accessing the Hardware Clock
  167. endef
  168. define Package/logger
  169. $(call Package/util-linux/Default)
  170. TITLE:=a shell command interface to the syslog system log module
  171. endef
  172. define Package/logger/description
  173. logger makes entries in the system log, it provides a shell command interface to the syslog system log module
  174. endef
  175. define Package/look
  176. $(call Package/util-linux/Default)
  177. TITLE:=display lines beginning with a given string
  178. endef
  179. define Package/look/description
  180. look utility displays any lines in file which contain string
  181. endef
  182. define Package/losetup
  183. $(call Package/util-linux/Default)
  184. TITLE:=set up and control loop devices
  185. endef
  186. define Package/losetup/description
  187. losetup is used to associate loop devices with regular files or block devices,
  188. to detach loop devices and to query the status of a loop device
  189. endef
  190. define Package/lsblk
  191. $(call Package/util-linux/Default)
  192. TITLE:=list block devices
  193. DEPENDS:= +libblkid +libuuid
  194. SUBMENU=disc
  195. endef
  196. define Package/lsblk/description
  197. lsblk lists information about all or the specified block devices
  198. endef
  199. define Package/mcookie
  200. $(call Package/util-linux/Default)
  201. TITLE:=generate magic cookies for xauth
  202. endef
  203. define Package/mcookie/description
  204. mcookie generates a 128-bit random hexadecimal number for use with the X
  205. authority system
  206. endef
  207. define Package/mount-utils
  208. $(call Package/util-linux/Default)
  209. TITLE:=related (u)mount utilities
  210. DEPENDS+= +libblkid +libmount +libuuid
  211. endef
  212. define Package/mount-utils/description
  213. contains: mount, umount, findmnt
  214. endef
  215. define Package/namei
  216. $(call Package/util-linux/Default)
  217. TITLE:=follow a pathname until a terminal point is found
  218. endef
  219. define Package/namei/description
  220. namei uses its arguments as pathnames to any type of Unix file (symlinks,
  221. files, directories, and so forth)
  222. endef
  223. define Package/rename
  224. $(call Package/util-linux/Default)
  225. TITLE:=rename files
  226. endef
  227. define Package/rename/description
  228. rename will rename the specified files by replacing the first occurrence of
  229. expression in their name by replacement
  230. endef
  231. define Package/partx-utils
  232. $(call Package/util-linux/Default)
  233. TITLE:=inform kernel about the presence and numbering of on-disk partitions
  234. DEPENDS:= +libblkid +libuuid
  235. SUBMENU=disc
  236. endef
  237. define Package/partx-utils/description
  238. contains partx, addpart, delpart
  239. endef
  240. define Package/script-utils
  241. $(call Package/util-linux/Default)
  242. TITLE:=make and replay typescript of terminal session
  243. SUBMENU=Terminal
  244. endef
  245. define Package/script-utils/description
  246. contains: script, scriptreplay
  247. endef
  248. define Package/setterm
  249. $(call Package/util-linux/Default)
  250. TITLE:=set terminal attributes
  251. SUBMENU:=Terminal
  252. endef
  253. define Package/setterm/description
  254. setterm writes to standard output a character string that will invoke the
  255. specified terminal capabilities
  256. endef
  257. define Package/sfdisk
  258. $(call Package/util-linux/Default)
  259. TITLE:=partition table manipulator for Linux
  260. SUBMENU=disc
  261. endef
  262. define Package/sfdisk/description
  263. list the size of a partition, list the partitions on a device, check the
  264. partitions on a device and repartition a device
  265. endef
  266. define Package/swap-utils
  267. $(call Package/util-linux/Default)
  268. TITLE:=swap space management utilities
  269. DEPENDS+= +libblkid +libuuid
  270. SUBMENU:=disc
  271. endef
  272. define Package/swap-utils/description
  273. contains: mkswap, swaplabel, swapon, swapoff
  274. endef
  275. define Package/uuidd
  276. $(call Package/util-linux/Default)
  277. TITLE:=UUID generation daemon
  278. DEPENDS:= +libuuid
  279. endef
  280. define Package/uuidd/description
  281. The uuidd daemon is used by the UUID library to generate universally unique
  282. identifiers (UUIDs), especially time-based UUIDs, in a secure and
  283. guaranteed-unique fashion, even in the face of large numbers of threads
  284. running on different CPUs trying to grab UUIDs.
  285. endef
  286. define Package/uuidgen
  287. $(call Package/util-linux/Default)
  288. TITLE:=create a new UUID value
  289. DEPENDS:= +libuuid
  290. endef
  291. define Package/uuidgen/description
  292. The uuidgen program creates (and prints) a new universally unique identifier
  293. (UUID) using the libuuid library. The new UUID can reasonably be considered
  294. unique among all UUIDs created on the local system, and among UUIDs created on
  295. other systems in the past and in the future.
  296. endef
  297. define Package/wall
  298. $(call Package/util-linux/Default)
  299. TITLE:=send a message to everybody's terminal
  300. SUBMENU=Terminal
  301. endef
  302. define Package/wall/description
  303. Wall sends a message to everybody logged in with their mesg permission
  304. set to yes
  305. endef
  306. define Package/whereis
  307. $(call Package/util-linux/Default)
  308. TITLE:=locate the binary, source, and manual page files for a command
  309. endef
  310. define Package/wipefs/description
  311. whereis locates source/binary and manuals sections for specified files
  312. endef
  313. define Package/wipefs
  314. $(call Package/util-linux/Default)
  315. TITLE:=wipe a signature from a device
  316. DEPENDS:= +libblkid +libuuid
  317. SUBMENU:=disc
  318. endef
  319. define Package/wipefs/description
  320. wipefs can erase filesystem, raid or partition table signatures (magic
  321. strings) from the specified device to make the signature invisible for
  322. libblkid.
  323. endef
  324. define Package/libblkid/install
  325. $(INSTALL_DIR) $(1)/usr/lib
  326. $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
  327. endef
  328. define Package/libmount/install
  329. $(INSTALL_DIR) $(1)/usr/lib
  330. $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
  331. endef
  332. define Package/libuuid/install
  333. $(INSTALL_DIR) $(1)/usr/lib
  334. $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
  335. endef
  336. define Package/agetty/install
  337. $(INSTALL_DIR) $(1)/sbin
  338. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
  339. endef
  340. define Package/blkid/install
  341. $(INSTALL_DIR) $(1)/sbin
  342. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
  343. endef
  344. define Package/cal/install
  345. $(INSTALL_DIR) $(1)/usr/bin
  346. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
  347. endef
  348. define Package/cfdisk/install
  349. $(INSTALL_DIR) $(1)/sbin
  350. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
  351. endef
  352. define Package/fdisk/install
  353. $(INSTALL_DIR) $(1)/sbin
  354. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
  355. endef
  356. define Package/findfs/install
  357. $(INSTALL_DIR) $(1)/sbin
  358. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
  359. endef
  360. define Package/flock/install
  361. $(INSTALL_DIR) $(1)/usr/bin
  362. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
  363. endef
  364. define Package/getopt/install
  365. $(INSTALL_DIR) $(1)/usr/bin
  366. $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
  367. endef
  368. define Package/hwclock/install
  369. $(INSTALL_DIR) $(1)/sbin
  370. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
  371. endef
  372. define Package/logger/install
  373. $(INSTALL_DIR) $(1)/usr/bin
  374. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
  375. endef
  376. define Package/look/install
  377. $(INSTALL_DIR) $(1)/usr/bin
  378. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
  379. endef
  380. define Package/losetup/install
  381. $(INSTALL_DIR) $(1)/sbin
  382. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
  383. endef
  384. define Package/lsblk/install
  385. $(INSTALL_DIR) $(1)/bin
  386. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
  387. endef
  388. define Package/mcookie/install
  389. $(INSTALL_DIR) $(1)/usr/bin
  390. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
  391. endef
  392. define Package/mount-utils/install
  393. $(INSTALL_DIR) $(1)/bin
  394. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/bin/
  395. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/bin/
  396. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/bin/
  397. endef
  398. define Package/namei/install
  399. $(INSTALL_DIR) $(1)/usr/bin/
  400. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
  401. endef
  402. define Package/rename/install
  403. $(INSTALL_DIR) $(1)/usr/bin/
  404. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
  405. endef
  406. define Package/partx-utils/install
  407. $(INSTALL_DIR) $(1)/usr/sbin
  408. $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
  409. $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
  410. $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
  411. endef
  412. define Package/script-utils/install
  413. $(INSTALL_DIR) $(1)/usr/bin
  414. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
  415. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
  416. endef
  417. define Package/setterm/install
  418. $(INSTALL_DIR) $(1)/usr/bin
  419. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
  420. endef
  421. define Package/sfdisk/install
  422. $(INSTALL_DIR) $(1)/sbin
  423. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
  424. endef
  425. define Package/swap-utils/install
  426. $(INSTALL_DIR) $(1)/sbin
  427. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/sbin/
  428. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/sbin/
  429. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/swapon $(1)/sbin/
  430. ln -sf swapon $(1)/sbin/swapoff
  431. endef
  432. define Package/uuidd/install
  433. $(INSTALL_DIR) $(1)/usr/sbin
  434. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
  435. endef
  436. define Package/uuidgen/install
  437. $(INSTALL_DIR) $(1)/usr/bin
  438. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
  439. endef
  440. define Package/wall/install
  441. $(INSTALL_DIR) $(1)/usr/bin
  442. $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
  443. endef
  444. define Package/whereis/install
  445. $(INSTALL_DIR) $(1)/usr/bin
  446. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
  447. endef
  448. define Package/wipefs/install
  449. $(INSTALL_DIR) $(1)/sbin
  450. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
  451. endef
  452. $(eval $(call BuildPackage,libblkid))
  453. $(eval $(call BuildPackage,libmount))
  454. $(eval $(call BuildPackage,libuuid))
  455. $(eval $(call BuildPackage,agetty))
  456. $(eval $(call BuildPackage,blkid))
  457. $(eval $(call BuildPackage,cal))
  458. $(eval $(call BuildPackage,cfdisk))
  459. $(eval $(call BuildPackage,dmesg))
  460. $(eval $(call BuildPackage,fdisk))
  461. $(eval $(call BuildPackage,findfs))
  462. $(eval $(call BuildPackage,flock))
  463. $(eval $(call BuildPackage,getopt))
  464. $(eval $(call BuildPackage,hwclock))
  465. $(eval $(call BuildPackage,logger))
  466. $(eval $(call BuildPackage,look))
  467. $(eval $(call BuildPackage,losetup))
  468. $(eval $(call BuildPackage,lsblk))
  469. $(eval $(call BuildPackage,mcookie))
  470. $(eval $(call BuildPackage,mount-utils))
  471. $(eval $(call BuildPackage,namei))
  472. $(eval $(call BuildPackage,rename))
  473. $(eval $(call BuildPackage,partx-utils))
  474. $(eval $(call BuildPackage,script-utils))
  475. $(eval $(call BuildPackage,setterm))
  476. $(eval $(call BuildPackage,sfdisk))
  477. $(eval $(call BuildPackage,swap-utils))
  478. $(eval $(call BuildPackage,uuidd))
  479. $(eval $(call BuildPackage,uuidgen))
  480. $(eval $(call BuildPackage,wall))
  481. $(eval $(call BuildPackage,whereis))
  482. $(eval $(call BuildPackage,wipefs))