Makefile 15 KB

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