Makefile 16 KB

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