Makefile 16 KB

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